Hi,
I seem to have an issue with getting any websites with custom written .htaccess files to run successfully on my local machine. Attempting to run them always results in a 500 Server Error.
Upon further inspection on the log file (/var/log/httpd/error_log), I came across the error message that says:
.htaccess: Options not allowed here
Which does not make sense as I explicitly allowed Options in my httpd.conf file. Is there another file I’m supposed to modify to allow my custom written .htaccess files to work?
Here is what my httpd.conf config looks like:
DocumentRoot "/home/cyb3rtooth/public_html"
<Directory "/home/cyb3rtooth/public_html">
Options Indexes FollowSymLinks MultiViews
AllowOverride Authconfig FileInfo Options
Require all granted
</Directory>
<Directory "/srv/http/cgi-bin">
AllowOverride All
Options None
Require all granted
</Directory>
Believe me, I tried changing AllowOverride to All as well with still no results. I am confused.
In case you were wondering, this is what my custom written .htaccess files look like:
File in main directory:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
File in public directory:
<IfModule mod_rewrite.c>
Options -Multiviews
RewriteEngine On
RewriteBase /blog/public
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
</IfModule>
File in app directory:
Options -Indexes
Any help would be highly appreciated.