I need to set up a 301 redirect from an old non Actinic php site to the root homepage of a new Actinic site.
For example I need to redirect pages such as these:
www.myolddomain.com/products.php?cat=1
www.myolddomain.com/product.php?id=10
www.myolddomain.com/buy.php
all to the homepage of:
www.mynewdomain.com
The following works to a degree:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?myolddomain\.com(.*)
RewriteRule (.*) http://www.mynewdomain.com/index.html [R=301,L]
but I end up with this URL:
http://www.mynewdomain.com/?id=105
Obviously I don't want the ?id=105 on the end.
Any htaccess fundis out there who can help me not loosing the last of my hair?
For example I need to redirect pages such as these:
www.myolddomain.com/products.php?cat=1
www.myolddomain.com/product.php?id=10
www.myolddomain.com/buy.php
all to the homepage of:
www.mynewdomain.com
The following works to a degree:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?myolddomain\.com(.*)
RewriteRule (.*) http://www.mynewdomain.com/index.html [R=301,L]
but I end up with this URL:
http://www.mynewdomain.com/?id=105
Obviously I don't want the ?id=105 on the end.
Any htaccess fundis out there who can help me not loosing the last of my hair?
Comment