Reputation: 5126
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
Upvotes: 8
Views: 22206
Reputation: 1
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.
Jon Lin
For me this didn't work. But i found a solution. Go to \wamp\bin\apache\apache2.4.9\conf\httpd.conf and find
<IfModule dir_module>
DirectoryIndex first_page.html if_not_found.html
</IfModule>`
Change first_page.html
to anything you want.
(I'm not native english speaker, so I apologize for my bad english.)
Upvotes: -3
Reputation: 143906
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
.
Upvotes: 19