• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue .htaccess not working

Asentrix

New Pleskian
No matter what I do, the htaccess will not work.
I'm trying to configure rewrite rules and it absolutely doesn't work, it's like it's not recognizing anything I put in the htaccess
I tried adding code so all .php extensions on my site are hidden in the URL and it ignores it completely:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

I also used the htaccess to nginx extension and converted my htaccess to nginx and that doesnt work either
YES proxy mode is turned on.

This issue is happening on both plesk servers I own, both are different versions and months apart in updates.
 
In order to find out if .htaccess is recognized I suggest to first put a line into it that is definitely wrong so that it causes a 500 error. Like just some random string "cdfghjkl". Is the website still responding in that case? Or does it deliver the expected 500 error?
 
Back
Top