I set up an apache manually and added a second web directory with this code:
Alias /webs c:\webs
<Directory /webs>
AllowOverride All
</Directory>
However, this web has an .htaccess file in it and accessing the website gives the error: "500 Internal Server Error", but does not write anything in the error log file.
But when I remove the .htaccess file, I don't get this error.
I added the "AllowOverride All" line and restarted the server but this doesn't correct the error.
My .htaccess is this:
RewriteEngine On
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?params=$1 [L,QSA]
<Files "test">
Order Allow,Deny
Allow from all
</Files>
What do I have to do so that I can use an .htaccess file in this directory?
Enable mod_rewrite in Apache web server. Also try this:
If mod_rewrite is enabled then initiates the rewrite engine; else it does nothing.
OK, I fixed this, it turned out to be two other issues, which I'll record here just in case it helps someone:
In my php.ini file, I had to set:
so that it would display errors (even though I had "error_reporting = E_ALL & ~E_STRICT").
Then the error was that I was trying to use RedBean with SQLite and needed to uncomment these in my php.ini file: