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 have found one solution but it is not ideal
redirect 301 /folder/oldurl http://mysite.com/newurl?
But it leaves a ? at the end of the redirected url. Any way to get rid of this?
redirect 301 /folder/oldurl http://mysite.com/newurl?
But it leaves a ? at the end of the redirected url. Any way to get rid of this?
Who is online
Users browsing this forum: Bing [Bot] and 38 guests