Removing file extensions

500 Error, please check your php script / enable display_errors in your cpanel

Well, i wanna remove file extensions on my website for better look for example:



i did add a new .htaccess file inside of htdocs>Main>


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

Thats it but it isn’t working, what can i do to fix it?

Did you do this? It’s under “Alter PHP Config”


yes. its enabled

See this thread

1 Like

The error message is misleading. When you see the error saying “please check your php script / enable display_errors in your cpanel”, it actually means that your .htaccess code is invalid. It’s not a PHP error and enabling display_errors isn’t going to show you anything else. If PHP code is not working, you’ll just see a “HTTP ERROR 500” page.

The problem in your code is with this line:

RewriteRule ^([^.]+)$ $1.html [NC, L]

You cannot have spaces in the flags bit (behind the block quotes). The valid version of the line is:

RewriteRule ^([^.]+)$ $1.html [NC,L]

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.