1

我需要将任何不是 index.php 的索引文件重定向到该文件。我这样做是为了万一在 URL 中明确命名了另一种类型的索引文件。这有望防止任何 404 文件未找到错误。

4

1 回答 1

1
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} !^(.*/)index\.php$ [NC]
RewriteRule ^ /profordable/index.php [L,R]
于 2013-07-17T17:55:01.497 回答