Forum Moderators: phranque

Message Too Old, No Replies

Literal Rewrite

         

jasonweb

6:47 pm on Jun 21, 2007 (gmt 0)

10+ Year Member



I need to set up a permanent redirect from here:

/details.php?r=73

To here:

/index.php?main_page=product_info&cPath=1&products_id=5

No fancy expressions or anything. If someone tries to access www.example.com/details.php?r=73 they are redirected to www.example.com//index.php?main_page=product_info&cPath=1&products_id=5.

Can someone tell me how to do this? Thanks in advance.

[edited by: jdMorgan at 4:46 am (utc) on June 22, 2007]
[edit reason] example.com [/edit]

sc112

7:50 pm on Jun 21, 2007 (gmt 0)

10+ Year Member



How about:

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /details\.php\?r=73\ HTTP/ [NC]
RewriteRule ^(.*)$ http://www.example.com/index.php?main_page=product_info&cPath=1&products_id=5 [R=301,L]

[edited by: jdMorgan at 4:47 am (utc) on June 22, 2007]
[edit reason] example.com and formatting fix [/edit]

jasonweb

1:26 pm on Jun 22, 2007 (gmt 0)

10+ Year Member



Perfect. Thank you.