It was published and signaled in this format.
For some reason I do not know, I see reported errors 404 related to pages with the correct name, but which have the extension.
So I wanted to create rules in .htaccess to remove extensions, but I keep getting errors.
Where am I wrong?
Code: Select all
...
# Remove .php-extension from url
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^\.]+)/$ $1.php
# Remove .htm-extension from url
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.htm -f
RewriteRule ^([^\.]+)/$ $1.htm
# Remove .html-extension from url
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^([^\.]+)/$ $1.html
...