【发布时间】:2014-12-11 16:06:04
【问题描述】:
好吧,也许我是垃圾,但我的简单重写 .htacces 规则不起作用。我只想在我的网站上例如 www.mysite.com/something.html 将规则重写为 www.mysite.com/something 。我只想删除 .html 并从文件 something.html 中获取内容
现在我的 .htacces 文件中有这个,但无法正常工作:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ $1.html [L,QSA]
AddType application/x-httpd-php5 .htm .html
【问题讨论】:
标签: regex apache .htaccess mod-rewrite rewrite