Forum Moderators: phranque

Message Too Old, No Replies

.htaccess redirect

redirect cats-89_1.html to cats-89-1.html

         

docny

11:52 pm on May 20, 2004 (gmt 0)

10+ Year Member



I was wondering if someone could help me with this redirect
redirect cats-89_1.html to cats-89-1.html

as the previous is search engine indexed and the later is a new rewrite rule...

89 being a variable for category..

redirect cats-$1_1.html to cats-$1-1.html

WhosAWhata

7:26 am on May 22, 2004 (gmt 0)

10+ Year Member



RewriteEngine on
RewriteRule cats-([0-9]{2})_1.html cats-$1-1.html

redirects all 2 digit numbers

RewriteEngine on
RewriteRule cats-(.*)_1.html cats-$1-1.html

redirects anything that starts with cats- and ends with _1.html

RewriteEngine on
RewriteRule (.*)_1.html $1-1.html

redirects anything that ends in _1.html

take your pick