SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URL Rewriting .htaccess

    HI friends,

    I have a problem with the rewrite URL in oscommerce part.

    As of now, cart is working fine with the url below and corresponding .htaccess contents.

    http://www.mysite.com/shirt-long-sleeves-c-1_80_82.php

    .htaccess content:

    RewriteRule ^(.*)-c-(.*).php$ index.php?cPath=$2&%{QUERY_STRING}


    But i need to modify this url to be like this...

    http://www.mysite.com/shirt/long-sleeves-1_80_82.php

    can anyone suggest how to make the htaccess for this?

    thanks in advance.

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,807
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    I think its just:
    Code:
    RewriteRule ^shirt/(.*)-c-(.*).php$ index.php?cPath=$2&%{QUERY_STRING}
    also consider using a more specific atom rather than .*

    Code:
    RewriteRule ^shirt/([a-zA-Z0-9_]+)-c-([a-zA-Z0-9_]+).php$ index.php?cPath=$2&%{QUERY_STRING}
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •