所以我使用.htaccess将旧网站页面重定向到新网站页面 . 我文件中的典型规则如下所示:
重定向301 /faqs.php http://blueprintprep.com/classroom/faq
奇怪的是,当旧的文件存在于服务器上,但是当我删除文件,最终网址实际上是这样的,它工作正常:
http://blueprintprep.com/classroom/faq?/faqs.php
蓝色火焰发生了什么?
该文件是由一串这些规则,这对笨的:
RewriteEngine叙述在RewriteBase /的RewriteCond% ^系统 . *重写规则^( . *)$ /index.php?/$1 [L]的RewriteCond% ^应用 . *重写规则^( . *)$的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]
1 回答
您可以改用
mod_rewrite
.无论文件是否存在,这都将起作用 .
希望有所帮助 .