Mod rewrite 删除重写规则上的.html无效

Mod rewrite 删除重写规则上的.html无效,mod-rewrite,url-rewriting,rewrite,Mod Rewrite,Url Rewriting,Rewrite,我想从下面的规则中删除URL中的.html,但我得到一个内部服务器错误 RewriteEngine On RewriteRule ^([^/]*)\.html$ /folder/index.php?s=$1 [L] 我想要http://localhost/folder/page.html将成为http://localhost/folder/page试试这个: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUES

我想从下面的规则中删除URL中的.html,但我得到一个内部服务器错误

RewriteEngine On
RewriteRule ^([^/]*)\.html$ /folder/index.php?s=$1 [L]
我想要
http://localhost/folder/page.html
将成为
http://localhost/folder/page

试试这个:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.html$ /folder/index.php?s=$1 [L]
</IfModule>

重新启动发动机
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-F
重写规则^(.*)\.html$/folder/index.php?s=$1[L]

嘿,pixeline,试过了,但没用。我也删除了.html,但也不起作用。你真的在服务器上安装了mod_rewrite吗?