• 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

Resolved mod_rewrite rules in .htaccess are ignored

TinaBura

Basic Pleskian
Server operating system version
AlmaLinux 8.9 (Midnight Oncilla)
Plesk version and microupdate number
Plesk Obsidian v18.0.59_build1800240229.10 os_RedHat el8
The mod_rewrite_rules in .htaccess are ignored. I use PHP 8.2.16 run as FPM application served by Apache. I have Proxy mode enabled.
I have made this check, and it works as desired and is redirected.

When I replace the content of .htaccess with my own rules, it is ignored. No errors in the logs. Every page just throws 404 - not found.
The content of my .htaccess:
Code:
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map|webp)(\?|$) /404error.php [L,NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

The same file works on the other Plesk server without issues. What can be the reason for not respecting the mod_rewrite rules?

Thank you!
 
Back
Top