←Searching For The New Donkey Kong Record| Obama and Clinton About To Do Penalty Kicks→
A few months ago, I started experiencing a very big problem with mod_rewrite rules on a site I run that is hosted with Hostway.
A simple mod_rewrite rule like the following would fail with a 403 Access forbidden error:
RewriteRule ^foo$ /static/foo.html [L]
It appeared that the server was getting confused by the fact that there was no directory named “foo”. What confused me most of all, though, was that I hadn’t made any changes to the site that might have prompted this error to start popping up.
Most disturbing, was that Hostway seemed to be at a complete loss as to why this error was suddenly coming up.
In a moment of desperation, while waiting for a response from my host, I came across an ugly hack that worked. If I created a folder named “foo” and in that folder put an .htaccess file with the redirection rule, THEN the redirection actually worked.
For the time being this worked out, so I was able to stop stressing about the fact that Hostway seemed to not understand my problem.
I have had to revisit the problem, however, because this hack really won’t work in the long-term. This time around, Google has presented me with a discussion at WordPress that provides the solution.
Putting the following at the top of the .htaccess file works for me:
Options +ExecCGI +FollowSymLinks -Indexes -MultiViews
Prior to this my .htaccess file only had the FollowSymLinks option set. It is still a mystery to me why the previous file stopped working. Sadly, this is not the first time Hostway has made a configuration change somewhere without any warning that caused sitewide problems.
Sunday March 9, 2008
←Searching For The New Donkey Kong Record| Obama and Clinton About To Do Penalty Kicks→
I'm Aran Johnson and I make websites.
I primarily use: PHP, MySQL, SubVersion, CakePHP, TextPattern, Cream Text Editor, and Addi Turbo Needles
Dollar and a half cardigan ... finished!
New York Times Chocolate Chip Cookie Modification
CakePHP ACL and Auth: Sample Website
CakePHP ACL and Auth Tutorial: Database Setup
CakePHP ACL Tutorial: Introduction
CakePHP ACL Tutorial: Usage With Auth Component
CakePHP ACL Tutorial: Initial Setup
CakePHP ACL Tutorial: Auth Component Example
CakePHP ACL Tutorial: How To Check Access
Cake PHP ACL Tutorial: The Database Tables
Dude, you are a lifesaver! I recently migrated to Hostway, and could not for the life of me figure out why rewritten URLs no longer worked. Thanks!
— Tyson Kirksey Aug 21, 01:57 PM #