Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup a simple htaccess redirect which looks like this (this is the whole .htaccess file):

Options +FollowSymLinks

RewriteEngine On

Redirect 301 /something

If I then load the site which contains this .htaccess, ie, I end up with the following 404:

The requested URL /something was not found on this server.

Apache/2.2.3 (Red Hat) Server at Port 80

And the logs:

[Tue Jul 10 14:25:46 2012] [error] [client] File does not exist: /home/sites/scp/something

Something is not a file, and something does not exist. I have assumed I could use Redirect the same as a Rewrite but it looks like the redirect needs to be for a file that actually exists?

I created the file 'something' and it just attempts to load the blank file. No redirect.

What am I missing in getting this working?

share|improve this question
Debug logs, for a start. – womble Jul 10 '12 at 6:50
Edit your question to include additional information, don't put it in a comment. – womble Jul 10 '12 at 7:19
The Redirect directive isn't part of mod_rewrite, so if that's all you're doing, you should remove the "RewriteEngine on" directive. – Jenny D Jul 10 '12 at 7:29
Thanks for that @JennyD. I've removed it - it seems though that perhaps my server isn't even attempting to load the htaccess. – willdanceforfun Jul 10 '12 at 8:04
Do you have access to the main server configuration? Does it have AllowOverride set - if so, to what? – Jenny D Jul 10 '12 at 8:06
up vote 4 down vote accepted

Make sure that

AllowOverride All

is set in the httpd.conf file!

But if you have access to the main config file, I would recommend doing the configuration there rather than in an .htaccess file - the .htaccess file will slow the server down. This may not be an issue if you have a very low server load, but it's just as well to use the best practices even on smaller projects.

share|improve this answer

My httpd.conf file was not configured on this server to AllowOverride in the site directory. It was set to 'none' which I changed to:

AllowOverride All
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.