# I broke my Apache somehow... rewrites aren't working.



## ghostcorps (Sep 25, 2010)

Hi Guys

 I had the rewrites working previously, and started to harden my installation by unloading a bunch of mods and blocking the server info in httpd.conf, but at some point the rewriting stopped working.

 I rolled back all the changes to the httpd.conf and commented out everything but the previously working rewrite rules in the .htaccess, but it still isn't rewriting.

 I had asked somewhere else and was advised to clean the Apache cache, but of course I can not figure out how to do that 

 Is there any way to troubleshoot the rewriting function in Apache?


Thanks in advance


nb. Apache 1.3 runing in a jail on FreeBSD 8.1


----------



## ohauer (Sep 25, 2010)

Have you modified a directive with

```
AllowOverride ...
```

This directive controls also what you can do in .htaccess


----------



## ghostcorps (Sep 26, 2010)

Thanks ohauer

I have not modified AllowOverride at all, it has been set to None from the start.


----------



## dave (Oct 4, 2010)

Any hints in /var/log/httpd-error.log?


----------



## dam23 (Oct 6, 2010)

Hi,


There are 2 possibilities here:

1/ your rewrite rules used to be in your vhost configuration and you moved them to the .htaccess

2/ you did indeed edit the AllowOverride directive and do not remember for sure



You have 2 options:

1/ Move your rewrite rules from the .htaccess to your vhost configuration

or

2/ Set AllowOverride to FileInfo and you *will* be able to rewrite.


From mod_rewrite's help page:
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

The directives there say: Override: FileInfo


----------

