【发布时间】:2013-09-01 02:29:18
【问题描述】:
我正在尝试将域 a 的 url 重定向到域 b,其中重定向是为了适应域 b 的最佳可能 url
例如,要进行 301 重定向的域 A。
http://www.abc.com/blog/
http://www.abc.com/old-games?view=pages&layout=sell
博客旁边有很多pga,旧游戏等下有很多页面作为子url。
域 B
http://www.xyz.com/index.php?option=com_blog&view=entry&Itemid=5
http://www.xyz.com/index.php?option=com_forms&view=pages&layout=sellgames&Itemid=10
已尝试以下 htaccess 重定向条件
RewriteCond %{REQUEST_URI} ^.*/blog.*$
RewriteRule .* http://www.xyz.com/index.php?option=com_blog&view=entry&Itemid=5 [R=301,L]
RewriteCond %{REQUEST_URI} ^.*/old-games.*$
RewriteRule .* http://www.xyz.com/index.php?option=com_forms&view=pages&layout=sellgames&Itemid=10 [R=301,L]
重定向发生在
http://www.xyz.com/index.php as tested using http://htaccess.madewithlove.be/
请建议最好的方法,就好像上面遗漏了什么一样
谢谢
【问题讨论】:
标签: php apache .htaccess redirect mod-rewrite