Forum Moderators: phranque
/index.cfm?action=related&linkid=26
We are moving to a static html system, so for the above example the new page would simply be:
/newlink.html
We don't have a lot of pages, under 20, so I planned to do just a simple Redirect rule for each url in the .htaccess file. However, I can't get it to work. Here's what I did:
redirect 301 /index.cfm?action=related&linkid=26 [newsite.com...]
I have a feeling it's got something to do with the dynamic variables in the original url.
Anyone have any ideas?
RewriteCond %{QUERY_STRING} ^action=related&linkid=26$
RewriteRule ^index.cfm$ /newpage.shtml? [R=301,L]
I learned that anything after the? in the URL is not read by redirectmatch or mod_rewrite. In mod_rewrite, you have to use the QUERY_STRING variable to access it.
I also needed to drop the query string in the new forwarded url....that's what the? is after the new url