Forum Moderators: phranque

Message Too Old, No Replies

rewrite single url via htaccess

         

chetanmadaan

6:57 pm on Oct 3, 2011 (gmt 0)

10+ Year Member



well .. i have a single url

index.php?product=jsck&view=article&id=353&down=true&menuid=205

and i want to rewrite this url along with

/product-1

is this possible via htaccess?

Thanks

g1smd

7:13 pm on Oct 3, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes. You need a one line
RewriteRule
for the internal rewrite. This rule must not mention the domain name, and it will use only the [L] flag.

You also need a two line ruleset to redirect external URL requests using the URL version that includes parameters. You'll need a RewriteCond looking at THE_REQUEST as well as a RewriteCond looking at the path part of the URL request. The RewriteRule target should include the domain name and use the
[R=301,L]
flags.

This type of question comes up several times per week, so there are thousands of previous examples here.