Here an example of old urls:
- Code: Select all
http://www.misite.com/test.cgi?cdo=001JHGJGJGJG
http://www.misite.com/test.cgi?cdo=001JHGJGJGJG&lng=EN
http://www.misite.com/public/test.cgi?cdo=001JHGJGJGJG
http://www.misite.com/public/test.cgi?cdo=001JHGJGJGJG&lng=EN
http://www.misite.com/EN/some/dirs/001JHGJGJGJG-somecode
they all pointed to the same page. Now I need to redirect all those urls to the new one that doesn't contain any code, just useful keywords:
- Code: Select all
http://www.misite.com/some/keywords/here/pagename
I tried using the following rules but they don't work:
- Code: Select all
RewriteRule 001JHGJGJGJG-(.*)$ http://www.misite.com/some/keywords/here/pagename [R=301]
RewriteRule 001JHGJGJGJG$ http://www.misite.com/some/keywords/here/pagename [R=301,L]
What am I doing the wrong way?
Thanks,
Haran