I have a website migrating from static pages to dynamic pages using CMS.
I tried to use Redirect 301 to move content pages from old location to new location:
- Code: Select all
Redirect permanent /mydirectory/mypage.shtml http://www.mysite.com/mydirectory/mynewpage-lxx.html
But I get a query string appended to the new URL which I guess is coming from the CMS:
- Code: Select all
http://www.mysite.com/mydirectory/mynewpage-lxx.html?name=mydirectory/mypage.
So I think I must use RewriteRule:
- Code: Select all
# enable mod_rewrite
Options +FollowSymLinks
RewriteEngine on
#
RewriteRule ^/mydirectory/mypage.shtml$ /mydirectory/mynewpage-lxx.html [R=301,L]
But this does not do anything. The old URL displays in the browser with a "page not found" generated by the CMS. Maybe I need a RewriteCond but I am not sure.
I would appreciate any help and advice to get this squared away.
Best regards,
Bangkok Bob