2017-07-06 44 views
0

根據我們的SEO的人,我們獲得流量以網址像這樣:有第二個URL重定向的URL附加

http://www.oursite.com/articles/article1/www.someothersite.com/page.aspx/sectionID%20=113/ 

我想301重定向到http://www.oursite.com/articles/article1(刪除多餘的URL)。在.htaccess嘗試這樣:

RedirectMatch 301 ^http://www.oursite.com/articles/article1/www.someothersite.com/page.aspx/sectionID%20=113/$ /articles/article1 

這是不工作...

+0

應該採取什麼'HTTP:// www.oursite.com/articles/article1/www.someothersite.com/page.aspx/sectionID%20 = 113 /'被重定向到? – anubhava

+0

http://www.oursite.com/articles/article1 – mustacheMcGee

回答

0

您可以在網站根目錄的.htaccess使用重定向規則:

RedirectMatch 301 /(.+)/www\.someothersite\.com/.*$ /$1