301 Re-direct Problem

Sparetoolparts

Free Member
Oct 26, 2015
573
52
43
Hey All

Last year I 301'ed some category pages on my website www.sparetoolparts.co.uk (Magento website) in my .htaccess file. I never noticed until now that a few of these 301's didn't work, after having a look I now know why; check out my rewrite below:

RewriteRule ^makita/cordless-tools/radio.html http://www.sparetoolparts.co.uk/makita/cordless-tools/radio.html [L,R=301]

As you can see this will never resolve as it is always pointing to itself, so eventually it times out with a too many re-directs message.

I tried to solve the issue by simply removing this rewrite from my .htaccess but it hasn't fixed the issue at:

https://www.sparetoolparts.co.uk/makita/cordless-tools/radio.html

I would have thought this would have been an instant fix any ideas on the next step to solve this issue?

P.S

I have cleared the Magento Cache etc
 
I'm still getting a 301 on that URL. Here's what a server header check shows me:

HTTP/1.1 301 Moved Permanently =>
Server => nginx
Date => Thu, 04 Jan 2018 12:24:19 GMT
Content-Type => text/html
Content-Length => 178
Connection => close
Location => http://www.sparetoolparts.co.uk/makita/cordless-tools/radio.html

Double check your htaccess and any caching plugins you've got. There may be another rewrite that causing this - for example, a rewrite of the whole /cordless-tools/ folder or a rewrite of all pages with the name radio.html.
 
Upvote 0
Hi

I have double checked the htaccess file and it is definitely gone,

Other pages inside cordless-tools work fine.

I've cleared my Magento Cache a few times now, so I'm unsure what else to try, I might look at the URL rewrite options in Magento
 
Upvote 0
Firstly remember 301 means PERMANENTLY MOVED. So use with caution. Browsers will cache the redirect as well as search engines.

You are best to use 302 until you are 100% confident the redirect will be permanent.

You are redirecting from http > https > http

But only for this URL the base site just redirects to https so it might be a setting in Magento or htaccess.

Code:
https://www.sparetoolparts.co.uk/makita/cordless-tools/radio.html

HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Mon, 08 Jan 2018 09:46:02 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: http://www.sparetoolparts.co.uk/makita/cordless-tools/radio.html
Expires: Tue, 08 Jan 2019 09:46:02 GMT
Cache-Control: max-age=31536000
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff

http://www.sparetoolparts.co.uk/makita/cordless-tools/radio.html

HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Mon, 08 Jan 2018 09:46:02 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.sparetoolparts.co.uk/makita/cordless-tools/radio.html
 
Upvote 0
I would think you've got another redirect that would be causing this behaviour.

Happy to take a look at the entire htaccess file. PM it to me if you don't want to post it here.
 
Upvote 0

Latest Articles