My htaccess file is giving my webpage a 500 error and I do not understand why ... this is the code:
AddHandler application/x-httpd-php56 .php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /gallery-page.php?galerie=$1
If I take the
.htaccess
file away, then I get 404 errors on the pages I needed renaming.If I have the
.htaccess
file with no code in it, I still get an error 500.
If somebody can help me understand, it would be great !
AddHandler
line? There is nothing particularly wrong with the code you have posted.%{REQUEST_FILENAME} !-f
line would likely break the site (if this was working as intended)! That line is required to prevent static resources (CSS, JS, images, etc.) and any other static files from being rewritten. (Assuming static resources are being served from the same site.)