【发布时间】:2013-01-17 06:40:31
【问题描述】:
我在两个文件夹中安装了 opencart - 一个是根文件夹,即“public_html/”,一个是“public_html/test/”。两个 opencart 都包含 .htaccess 文件。
'public_html/'文件夹中opencart的.htaccess文件包含以下重写规则:
RewriteBase /
RewriteRule sitemap.xml /new/index.php?route=feed/google_sitemap
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{HTTP_HOST} ^abcd\.co\.in
RewriteRule (.*) http://www.abcd.co.in/$1 [R=301,L]
'public_html/test/'文件夹中opencart的.htaccess文件包含以下重写规则:
RewriteBase /test/
RewriteRule sitemap.xml /new/index.php?route=feed/google_sitemap
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
问题是当我打开域 http://abcd.co.in 时,它会重定向到 http://www.abcd.co.in,但是当我打开 http://abcd.co.in/test
它没有重定向
我到 http://www.abcd.co.in/test
【问题讨论】:
标签: .htaccess redirect opencart