Reputation: 1162
I want to remove the .html from the URL from the rule below but I get a Internal Server Error
RewriteEngine On
RewriteRule ^([^/]*)\.html$ /folder/index.php?s=$1 [L]
I want http://localhost/folder/page.html
to be http://localhost/folder/page
Upvotes: 0
Views: 292
Reputation: 17984
Try this:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.html$ /folder/index.php?s=$1 [L]
</IfModule>
Upvotes: 1