0
我有以下的.htaccess文件設置,以重新設置我的所有.co.uk網站流量到網站new .com域名。.htaccess - 條件條件?
# Redirect all requests NOT made under www.domain.com
RewriteCond %{REQUEST_URI} !/admin
#RewriteCond %{HTTP_HOST} !^www\.domain-name\.com [NC]
#RewriteRule ^(.*)$ http://www.domain-name\.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.domain-name\.com
RewriteRule (.*) http://www.domain-name.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) index.php?seo_path=$1&%{QUERY_STRING} [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.domain-name.com/ [R=301,L]
ErrorDocument 404 /page-not-found.php
但是我想.co.uk /博客重定向到新的.com /博客然而,此刻,所有的情況是,當您訪問.co.uk /博客重定向到.COM主頁。 - 我相信這是因爲;
RewriteRule ^(.+) index.php?seo_path=$1&%{QUERY_STRING} [L]
如果URL結束/博客,我會如何添加一個條件來否決此?