Hi there
We’re about to launch a new site for a client and need some help figuring out how to redirect their old, non EE urls to the new pages we’ve created in EE.
I’d normally do a simple 301 redirect in the .htaccess file, but the problem here is that their old urls are in the following format:
/contentpage.php?pageid=70The following results in a 404 on the new EE site:
redirect 301 /contentpage.php?pageid=70 <a href="http://www.clientdomainname.com/their-new-page/">http://www.clientdomainname.com/their-new-page/</a>I’m fairly sure the answer is modrewrite, but can’t figure out how to go about writing the appropriate code. Anyone any ideas?
My current .htaccess includes the following to hide index.php:
# turn on RewriteEngine
RewriteEngine on
# Redirect non www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ <a href="http://www.%{http_host}/$1">http://www.%{http_host}/$1</a> [R=301,L]
# ee stuff
RewriteCond $1 !^(assets|engine-room|robots\.txt|index\.php|admin\.php|webstat|googlea60d4a5d3d2f97fc\.html) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]Looking forward to hearing if anyone has a solution.
Cheers
Jim