|

Solved: Hostway, Mod_rewrite and 403 errors

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

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    #

Last week, I found that clients attempting to regsister and log into the front end of my joomla install were presented with an error ‘403’ page. I eventually found a similar hack to my htaccess file and all seemed well – Until I discovered we had been bumped down 180 positions in Google. It now appears the hack cause Google to detect multiple instances of pages and penalises us for ‘illegal’ activities. Really hope this amendment works. Will update my comments once I try it and see if it affects out google postion in the next few days. Thanks.


A.Afolabi    Nov 26, 07:00 AM    #

You are a lifesaver! I spent an hour trying to figure this out and then googled “wordpress permalink hostway” and this came right up. Thank you!


Bill Laboon    Jan 20, 02:15 PM    #

Thank you for this post. I am about to switch from Wordpress.com to Wordpress.org. I currently have an account with Hostway, but will host my blog at a more stable service provider thanks to this post.


Dennis Beckner    Feb 19, 12:40 PM    #

Name

E-mail (will not be published)

Your Website

Message

Textile Help


|

rss feed iconRSS / Atom

Aran World

My Amazon.com Wish List

I'm Aran Johnson and I make websites.

I primarily use: PHP, MySQL, SubVersion, CakePHP, TextPattern, Cream Text Editor, and Addi Turbo Needles

Contact Me

My website portfolio

Recently

CakePHP ACL and Auth: Record Level Protection

How To Play Hearts With Only Two Players

Facebook Privacy Settings

Guitar Hero World Tour Microphone Compatibility

Foreign Policy Experience

CakePHP Tutorials

CakePHP ACL and Auth: Record Level Protection

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

My Flickr

Advertisement:
Protect Your LCD or Plasma TV Screen From Accidents

All content © Aran Johnson