DooDoo
01-25-2011, 09:07 AM
I just change all url in my website around 2000 url.
The pattern of old url have fix pattern such as www.example.com/book-XXXXXXXX.html
where book- is fix and XXXXXXXX is variable.
I change the new url by delete fixing word book-.
so www.example.com/book-XXXXXXXX.html is changed to www.example.com/XXXXXXXX.html
Anyone please kindly advise how to write in .htaccess to redirect all old url to new url.
I have try 2 times as follows but it does not work.
RewriteCond http://www.example.com/book-^(.*)$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteCond http://www.example.com/book-(.*) [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Many thanks in advance.
The pattern of old url have fix pattern such as www.example.com/book-XXXXXXXX.html
where book- is fix and XXXXXXXX is variable.
I change the new url by delete fixing word book-.
so www.example.com/book-XXXXXXXX.html is changed to www.example.com/XXXXXXXX.html
Anyone please kindly advise how to write in .htaccess to redirect all old url to new url.
I have try 2 times as follows but it does not work.
RewriteCond http://www.example.com/book-^(.*)$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteCond http://www.example.com/book-(.*) [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Many thanks in advance.