【发布时间】:2011-08-05 01:50:08
【问题描述】:
所以我使用 .htaccess 将旧网站页面重定向到新网站页面。我的文件中的典型规则如下所示:
重定向 301 /faqs.php http://blueprintprep.com/classroom/faq
奇怪的是,当服务器上存在旧文件时它工作正常,但是当我删除文件时,最终 URL 实际看起来像这样:
http://blueprintprep.com/classroom/faq?/faqs.php
蓝色的火焰中发生了什么??
该文件由一堆这些规则组成,对于 CodeIgniter:
重写引擎开启 RewriteBase / RewriteCond %{REQUEST_URI} ^system.* 重写规则 ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_URI} ^应用程序。* RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteRule ^application_consulting/(.*) http://blueprintprep.com/oneonone/app_consulting [R=301,L]
RewriteRule ^weekend/(.*) http://blueprintprep.com/classroom [R=301,L]
RewriteRule ^workshop/(.*) http://blueprintprep.com/oneonone [R=301,L]
【问题讨论】:
-
htaccess 文件中还有什么?