So I was adding some Project 2016 posts to the site this morning, when this ghastly thing appeared:
I refreshed. I waited. I went to work. I came back. I download my error_log
and signed into my FTP server and poked around, and Googled, and found the problem! It was this:
Redirect 301 /about/log.html /about/faq.html#x-changelog
That should have been this:
Redirect 301 http://cyberd.org/about/log.html http://cyberd.org/about/faq.html#x-changelog
The smallest things, huh?
What's odd is that this simple redirect has been there for over a year now, and it's not until today it became a problem. Using relative links within .htaccess for regular redirect rewrites is apparently a no no, so instead of opting for one of the potential workarounds I decided to just add in the absolute path. And there you go. Refreshed the page, and it's working again! Sorry for the downtime.
In the process I also found this nifty little tool to validate my .htaccess, and here's some useful tricks too.
What I'd really like to know though is how to redirect to a page with a section ID in the URL - of which the number symbol is coincidentally also the symbol used to enclose code comments in .htaccess, for example the still broken but not site-breaking example above: http://cyberd.org/about/faq.html#x-changelog
I can redirect to the main page fine, but how in the world can I redirect to a specific section on said page without said part of said URL being commented out?! A small problem with no apparent solution.
But at least the site's working again.
Comments
This was pretty damn interesting. And yet, nobody's spoken! Be the first!
© CyberD.org 2025
Keeping the world since 2004.
The Comment Form