0

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?

2 Answers 2

1

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.

0

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

http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.