I've got Apache 2.2 installed on my Windows machine, and there seems to be a problem with .htaccess.
I enabled `mod_rewrite` in `httpd.conf` file, and wrote some conditions into my .htaccess, but nothing works. I tried putting some garbage into it, to see if it would return Internal Server Error, but not even that would work. What could be the problem?
Could the problem be, that my Apache is located in "C:\Program Files\Apache Software Foundation", and my server root is at "C:\Users\Grega\Server"? I can't find anything that would point to .htaccess in httpd.conf
Additionally, double check that the filename is all lowercase. Your .htaccess file should be named exactly as .htaccess. Certain .htaccess rules may be sensitive to where they are located within the .htaccess file and therefore cause an .htaccess not working issue.
.htaccess files are extremely useful in many cases for users who either do not have root permissions or for users who simply aren't comfortable in making changes in their web server's configuration file.
If the AllowOverride directive is set to None then this will disable all .htaccess files. In order to verify this, you must open the Apache configuration file (typically either called httpd.conf or apache.conf) and check that the AllowOverride directive is set to AllowOverride All.
Since .htaccess file rules apply to the directory that they live in, as well as all other subdirectories, it can happen that two or more .htaccess files are conflicting with one another. To verify this, try disabling each additional .htaccess file you have one-by-one in order to see where the issue is.
Make sure you don't have AllowOverride None
set for the directory C:\Users\Grega\Server
. Otherwise htaccess files could be entirely ignored. You could turn all the overrides on by an AllowOverride All
or at the very least AllowOverride FileInfo
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With