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 upgraded my laptop from Ubuntu 10.04 to Ubuntu 11.10. Now my apache webserver doesn't seem to recognize the .htaccess file because none of my url rewrites are working. I tried an a2enmod rewrite but apache says it's already enabled. I restarted the apache server, but my rewrites still don't work. I tried typing garbage text into my .htaccess file hoping to create errors such as 500 Internal Server errors, but no errors occurred. It's as if Apache isn't even reading my .htaccess files. My apache2.conf file has a line that says AccessFileName .htaccess.

How do I get my RewriteRules in .htaccess file working again?

share|improve this question
up vote 1 down vote accepted

Well, if the .htaccess files are truly not getting parsed, you need an AllowOverride directive in your main config:

AllowOverride FileInfo

(that'll allow your mod_rewrite directives, use All if you need to allow any directive)

By the way, why use .htaccess at all? From the docs:

In general, you should never use .htaccess files unless you don't have access to the main server configuration file.

share|improve this answer

Take a look at the AllowOverride directive, which controls what sort of entries are accepted in .htaccess. This is configured in a Directory context.

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.