October 8th, 2008, 03:22 AM
Editing .htaccess, 301 redirect link with variables
I want to redirect an old page (http://www.website.com/page.php?id=47) to a new page (http://www.website.com/redirectpage/). For some reason the code I used does not work. My rewrite engine does work, because other RewriteRules work correctly.
What can I do to fix this problem?
RewriteRule ^page.php?id=47(.*)$ /redirectpage/$1 [R=301,L]
People who get a raise because of their good work have been underpayed for quite some time.
October 12th, 2008, 06:55 PM
It's not working because you are setting the variable on the url you want to mask and not the main url that is shown to the user.
So if you entered in yoursite.com/p-47
RewriteRule ^p-(.*)$ /page.php?id=$1 [R=301,L]
it would be the same as entering in yoursite.com/page.php?id=47
That is assuming that the .htaccess file is in the root directory.
June 14th, 2010, 04:57 PM
301 redirect with
I have been in 4 forums and found no help, the best help I think is in your post... Could you help with the following?
I want to redirect index.php?option=com_content&task=view&id=70&Itemid=82 (that no longer exists) to /folder1 address using a 301 php redirect.
I'm familiar with a oldpage.html to a newpage.html, but ?option....I'm looking to do this for several ?options variants.
Thanks in advance!!!