301 Redirect Flip Flop for Dash Special Character
I have operated a site for over 25 years, and as a result of rolling the site into new software over those years there are may 301 redirects in .htaccess.
Since the site often uses categories, articles or products with "gluten-free" in the name, a dash (special character n%2d) was used very often in the sites SEO URL's. Initially, all of those SEO URL's substituted n%2d for the dash (-) and they were all indexed by google and linked to from other sites using n%2d, so the backlinks would look like this "gluten%2dfree" in the URL string.
The problem is that over the years my hundreds of redirects will break regularly, and so far that has happened at least 7-8 times. What happens is the redirects stop working, and I need to go substitute a real dash (-) in place of the special character (n%2d), or vice versa. I suspect this is due to Apache updates, but am not 100% sure.
Can someone explain what could be going on here? The problem is that I don't notice these redirect are not working for weeks or months after they break. The break is caused by a flip flop in how the dash is handled, either I need to use n%2d OR - but there is no warning when this might happen or why, but it does happen on a seemingly random basis.
Any advice would be appreciated.
-
Who said it was no longer happening? I just spent a few hours yesterday fixing all of my broken redirects, because this very thing happened again. I can't say exactly when it happened, but probably some time in the past 6 months. I don't like your recommendation...no, I can't leave that logging level on my server for months at a time to catch this. It would be good to hear from others on this topic. I have no idea of the Apache architecture and how redirects and special html characters are handled, but whomever works on Apache in this area would obviously be the place to start. Clearly 301 redirects need to function on both the actual character, like the dash (-), AND the corresponding html character ( n%2d ), and this should be true for all special characters used in URLs. 0 -
I didn't intend for you to leave it for months, just a few minutes while the issue was happening. I thought from the way your post was worded that it wasn't currently an ongoing problem. I'll leave this marked as new for a bit to see if anyone else has run into this. 0 -
Just to clarify, it has been ongoing for over a decade, but is totally unpredictable. I speculate that it has to do with Apache kernel updates, but since this happens once every 1-2 years it's really hard for me to pinpoint exactly when it might happen, and to test my redirects with every single kernel update, which happens on my server on an automated basis. I usually notice this with other tools like SEMRush which can record lost external links. In summary, after I notice it I have to spend a lot of time fixing and testing the 100's of redirects, thus, I finally worked up the time to report this strange behavior. I mean, should a server admin need to be concerned about having to do this every year or two, because of some code change in the kernel? 0 -
There's no such thing as an "Apache kernel update" - there's Apache, there's the kernel, and they aren't related at all. I do think there is a misinformed "set it and forget it" idea in web hosting that once you've built something great you can just leave it, but that isn't the case. With how quickly PHP and MySQL/MariaDB versions change and with security problems coming up, a website being untouched for 2-3 years is more of a vulnerability than a blessing of not having to perform any work. That being said, I haven't heard of anything like what you're seeing happening, so it might be time to get a system administrator involved. 0 -
Well, the kernel is updated regularly on my server and cPanel forces me to reboot at that point (no I'm not paying for your cloud version). I suspect that the changes may be related to kernel updates, or Apache updates, not sure which, but no, how Apache handles redirects should not be changing over time, sorry, I just don't buy your reasoning here. 0 -
...and who said anything about a website not being touched for 2-3 years? I'm talking here about the frequency of the issue described, not how often work is done to my site. 0
Please sign in to leave a comment.
Comments
8 comments