.htaccess在本地不起作用?

.htaccess在本地不起作用?,.htaccess,.htaccess,我有一个网站,我想从页面中删除.html扩展名。这是我的.htaccess文件 <Files ~ "^\.(htaccess|htpasswd)$"> deny from all </Files> Options Indexes DirectoryIndex index.html RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.html [NC,L]

我有一个网站,我想从页面中删除.html扩展名。这是我的.htaccess文件

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
Options Indexes
DirectoryIndex index.html  
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]     
order deny,allow

全盘否定
期权指数
DirectoryIndex.html
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写规则^([^\.]+)$$1.html[NC,L]
命令拒绝,允许

但它不起作用。请帮助我

您是否在apache中激活了mod_rewrite