我在做一个域名www.centreauto.ca 正在重定向到www.autoevolution95.com.
我在centreauto.ca的.htaccess文件中编写了一系列重写规则:
# Use PHP5.4 as default
#AddHandler application/x-httpd-php54s .php
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymlinks
Options +SymLinksIfOwnerMatch
# Prevent Directoy listing
Options -Indexes
# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([^?]*) action.php?route=$1 [L,QSA]
Redirect 301 / http://www.autoevolution95.com/
Redirect 301 /?lang=french http://www.autoevolution95.com/
Redirect 301 /?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /index.php http://www.autoevolution95.com/
Redirect 301 /index.php?lang=french http://www.autoevolution95.com/
Redirect 301 /index.php?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /car-sales http://www.autoevolution95.com/
Redirect 301 /car-sales?lang=french http://www.autoevolution95.com/
Redirect 301 /car-sales?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /car-sales/carfax http://www.autoevolution95.com/
Redirect 301 /car-sales/carfax?lang=french http://www.autoevolution95.com/
Redirect 301 /car-sales/carfax?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /car-sales/credit-application http://www.autoevolution95.com/
Redirect 301 /car-sales/credit-application?lang=french http://www.autoevolution95.com/
Redirect 301 /car-sales/credit-application?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /car-sales/financing http://www.autoevolution95.com/
Redirect 301 /car-sales/financing?lang=french http://www.autoevolution95.com/
Redirect 301 /car-sales/financing?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /car-sales/inspections http://www.autoevolution95.com/
Redirect 301 /car-sales/inspections?lang=french http://www.autoevolution95.com/
Redirect 301 /car-sales/inspections?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /car-sales/warranties http://www.autoevolution95.com/
Redirect 301 /car-sales/warranties?lang=french http://www.autoevolution95.com/
Redirect 301 /car-sales/warranties?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /car-sales/we-buy http://www.autoevolution95.com/
Redirect 301 /car-sales/we-buy?lang=french http://www.autoevolution95.com/
Redirect 301 /car-sales/we-buy?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /car-sales/why-centre-auto http://www.autoevolution95.com/
Redirect 301 /car-sales/why-centre-auto?lang=french http://www.autoevolution95.com/
Redirect 301 /car-sales/why-centre-auto?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /body-work http://www.autoevolution95.com/
Redirect 301 /body-work?lang=french http://www.autoevolution95.com/
Redirect 301 /body-work?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /body-work/got-into-an-accident http://www.autoevolution95.com/
Redirect 301 /body-work/got-into-an-accident?lang=french http://www.autoevolution95.com/
Redirect 301 /body-work/got-into-an-accident?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /body-work/insurance-claim http://www.autoevolution95.com/
Redirect 301 /body-work/insurance-claim?lang=french http://www.autoevolution95.com/
Redirect 301 /body-work/insurance-claim?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /body-work/body-repair http://www.autoevolution95.com/
Redirect 301 /body-work/body-repair?lang=french http://www.autoevolution95.com/
Redirect 301 /body-work/body-repair?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /body-work/guarantee http://www.autoevolution95.com/
Redirect 301 /body-work/guarantee?lang=french http://www.autoevolution95.com/
Redirect 301 /body-work/guarantee?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /body-work/book-body-work-appointment http://www.autoevolution95.com/
Redirect 301 /body-work/book-body-work-appointment?lang=french http://www.autoevolution95.com/
Redirect 301 /body-work/book-body-work-appointment?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /mechanics http://www.autoevolution95.com/
Redirect 301 /mechanics?lang=french http://www.autoevolution95.com/
Redirect 301 /mechanics?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /mechanics/auto-repair http://www.autoevolution95.com/
Redirect 301 /mechanics/auto-repair?lang=french http://www.autoevolution95.com/
Redirect 301 /mechanics/auto-repair?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /mechanics/maintenance http://www.autoevolution95.com/
Redirect 301 /mechanics/maintenance?lang=french http://www.autoevolution95.com/
Redirect 301 /mechanics/maintenance?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /mechanics/book-mechanical-repair-appointment http://www.autoevolution95.com/
Redirect 301 /mechanics/book-mechanical-repair-appointment?lang=french http://www.autoevolution95.com/
Redirect 301 /mechanics/book-mechanical-repair-appointment?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /company/promotions http://www.autoevolution95.com/
Redirect 301 /company/promotions?lang=french http://www.autoevolution95.com/
Redirect 301 /company/promotions?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /company http://www.autoevolution95.com/
Redirect 301 /company?lang=french http://www.autoevolution95.com/
Redirect 301 /company?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /company/contact-us http://www.autoevolution95.com/
Redirect 301 /company/contact-us?lang=french http://www.autoevolution95.com/
Redirect 301 /company/contact-us?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /got-into-an-accident http://www.autoevolution95.com/
Redirect 301 /got-into-an-accident?lang=french http://www.autoevolution95.com/
Redirect 301 /got-into-an-accident?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /insurance-claim http://www.autoevolution95.com/
Redirect 301 /insurance-claim?lang=french http://www.autoevolution95.com/
Redirect 301 /insurance-claim?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /body-repair http://www.autoevolution95.com/
Redirect 301 /body-repair?lang=french http://www.autoevolution95.com/
Redirect 301 /body-repair?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /guarantee http://www.autoevolution95.com/
Redirect 301 /guarantee?lang=french http://www.autoevolution95.com/
Redirect 301 /guarantee?lang=english http://www.autoevolution95.com/?lang=en
Redirect 301 /brochures/garanties-supplementaires-vehicules-automobiles.pdf http://www.autoevolution95.com/
Redirect 301 /brochures/garanties-supplementaires-vehicules-automobiles_en.pdf http://www.autoevolution95.com/?lang=en
Redirect 301 /sitemap http://www.autoevolution95.com/sitemap.xml
Redirect 301 /sitemap?lang=french http://www.autoevolution95.com/sitemap.xml
Redirect 301 /sitemap?lang=english http://www.autoevolution95.com/sitemap.xml
但是,如果您现在导航到其中一个本应正确重定向的页面,它们会错误地被重定向到错误的路径,即:
http://www.centreauto.ca/car-sales?lang=english
不重定向到:
http://www.autoevolution95.com/?lang=en
有没有关于什么地方做错了的建议?会不会是autoevolution95.com上的url重写不正确
以下是它们的一个示例:
urlpatterns += patterns('',
url(r'^$', DKIObjectsView.as_view(
template_name="addon-sites/autoevolution95/main-site/pages/index.html",
relevance_json = silos_keywords_json)),
谢谢你
米哈尔
301
.htaccess文件中的重定向是文本的Redirect 301 /insurance-claim http://www.autoevolution95.com/
表示将/insurance-claim
重定向到http://www.autoevolution95.com/
因此,如果要重定向到新域中的同一url,必须将其添加到重定向规则中:
Redirect 301 /insurance-claim http://www.autoevolution95.com/insurance-claim
更好的解决方案可能是提出重写规则,将所有内容从旧域重定向到新域
相关问题 更多 >
编程相关推荐