I have a website which is being renewed.
It has url's like site.com/page.php?p=company&l=nl The new URL is site.com/company
I would like to use .htaccess to redirect 301. (I would like to keep the SEO pagerank for the old pages)
Because of the ? it doesn't work.
This is the rule I use in my htaccess which doesn't work:
Redirect 301 /page.php?p=company&l=nl http ://www.site.com/company
This is the rule I use in my htaccess which does work:
Redirect 301 /page.php http ://www.site.com/company
I need the ?p=...
This should work:
RewriteCond %{QUERY_STRING} ^p=company&l=nl$ [NC]
RewriteRule ^page\.php$ http ://www.site.com/company? [R=301,NE,NC,L]
Remove the space between http and :