301 redirects and seo URLs
Posted: Thu Nov 03, 2011 8:20 pm
Hello, I'm having trouble implementing some 301 redirects. The site has just been moved from a directory to the web root
i.e from example.com/home to example.com.
Some urls have also been renamed and we want to redirect these to the new urls
i.e redirecting from /home/oldurlname redirecting to /newurlname
The way our site is set up with seo urls it keeps appending information to the redirected url because of the following line in htaccess
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
The full htaccess without any redirects in place is
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.myshop.net [NC]
RewriteRule ^(.*)$ http://myshop.net/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
There are several other topics on the subject but I can't seem to make any of the suggestions in them work. It may possibly be that I'm placing the redirect in the wrong place within the .htaccess file.
Any help greatly appreciated.
i.e from example.com/home to example.com.
Some urls have also been renamed and we want to redirect these to the new urls
i.e redirecting from /home/oldurlname redirecting to /newurlname
The way our site is set up with seo urls it keeps appending information to the redirected url because of the following line in htaccess
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
The full htaccess without any redirects in place is
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.myshop.net [NC]
RewriteRule ^(.*)$ http://myshop.net/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
There are several other topics on the subject but I can't seem to make any of the suggestions in them work. It may possibly be that I'm placing the redirect in the wrong place within the .htaccess file.
Any help greatly appreciated.