【发布时间】:2013-01-17 14:01:17
【问题描述】:
我正在尝试删除所有 index.html 文件和扩展名,就像我的 index.php 规则一样。
意思是,而不是
www.discretix/modules-hdcp/index.html
应该有
www.discretix/modules-hdcp/
它适用于index.php,但不适用于index.html。
我正在使用 wordpress,我的服务器是 apache。
这些是我的 htaccess 规则:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~discretix/
RewriteRule ^index\.php$ - [L]
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~discretix/index.php [L]
</IfModule>
【问题讨论】:
-
您要进行实际的重定向吗? (服务器发送301 http状态码和新位置)