Website on Plesk returns error 500: Invalid command 'RewriteEngine', or pages

Started by Suhitha, Dec 03, 2025, 05:52 AM

Previous topic - Next topic

Suhitha

Question: Website on Plesk returns error 500: Invalid command 'RewriteEngine', or pages for all sites return 404


Applicable to:

  • Plesk for Linux


Symptoms

  • Websites that are using the rewrite module for Apache are inaccessible with the HTTP Error 500.
  • Error like the following could be found in Apache logs in Domains > example.com > Logs or in /var/www/vhosts/system/example.com/logs/error_log:

[core:alert] [client 203.0.113.2:40913] /var/www/vhosts/example.com/httpdocs/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
  • Module rewrite_module for Apache is not loaded:
# httpd -M | grep -i rewrite

  • Main websites' pages work, but permalinks result in a 404 error, with no log entries.

Cause

Rewrite module for Apache is disabled.


Resolution

Enable rewrite_module module:

1.Log in to Plesk.

2.Go to Tools & Settings > Apache Web Server > Apache modules.

4.Check rewrite and click OK.