我无法弄清楚为什么我的重定向不能正常工作,因为它们在另一个htaccess文件中 .
我正在尝试将旧网址重定向到新网址 .
RewriteEngine on
AddDefaultCharset UTF-8
DirectoryIndex index.php index.html
<IfModule mod_php.c>
php_flag magic_quotes_gpc off
</IfModule>
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule (.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
Redirect /private_3 http://website.com/new_private
我尝试过各种各样的东西,我在网上找到但没有任何作用 .
请帮忙 .
谢谢 .
2 回答
看起来糟糕的订单和
mod_alias
与mod_rewrite
混合可能是一个问题 . 尝试重新排序您的规则:而不是使用这个:
尝试在
RewriteEngine on
行下方添加此内容: