移動網站URL的SEO友好的重寫方法從補充指南向根父母文件夾
您恰好設定了您的站點、blog例如WordPress, Drupal、LiveJournal或者美滿的管理系統例如Joomba和Mambo在URL鏈接例如http://www.domain.com/mylovelysite,并且有正派交通網站。 現在整頓鍛煉,您決定移動站點從補充指南向父母文件夾,適當地在站點的根地點改為。 移動站點向另一個文件夾或根文件夾將打破所有鏈接和backlinks參考到您的網站。 如果這些殘破的鏈接沒有適當地被處理并且沒有被改方向,將有很多404頁沒被發現的錯誤,潛在地駕駛訪客,或者在最壞,影響并且降低搜索引擎等第位置(SERP)。
最佳的方式處理站點的URL的變動由於目錄地點的運動是通過使用mod_rewrite模塊提供的改變方向特點在亞帕基印第安人HTTPD網絡服務器。 默認情況下多數WEB主機使用Apache Web Server支持mod_rewrite改方向,并且可能容易地實施這個把戲。 您將需要使能和起動mod_rewrite模塊。
從補充指南或次級文件夾要改方向到根目錄,增加以下行文本往位於補充指南的.htaccess文件上面改所有請求方向入那個文件夾將被改方向到新的地點(即。 根)適當地。 如果.htaccess文件不存在,創造一。
<IfModule mod_rewrite.c>
RewriteEngine
RewriteBase/
RewriteRule ^mylovelysite/(。*) $/$1 [R=301、北卡羅來納, L]
</IfModule>
替換 mylovelysite 在上面線以目錄名稱在您的網站的URL。 這些在.htaccess排行改要求方向/mylovelysite補充指南對根目錄由剝離的「mylovelysite/」在URL外面。 例如,到http://www.domain.com/mylovelysite/index.html的一次參觀將得到改方向對http://www.domain.com/index.html,而不是退回404錯誤。 這為走向您的站點通過書簽或喜愛的訪客是有用的,或者那些通過未再爬行的查尋引擎在他們的查尋索引發現您的網頁,再spidered和刷新與新的URL在初期天在移動以後。
然而,影響您的站點的搜索引擎等第的可能仍然運動意志。 重寫統治上述永久改方向保證的確定301 PageRank或等第將通過在對新的URL為搜索引擎優化(SEO)。 直到新的站點結構得到充分地重新編目,也許臨時地減少有機交通從查尋引擎。
重要 : This is a machine translated page which is provided "as is" without warranty. Machine translation may be difficult to understand. Please refer to original English article whenever possible.
Share and contribute or get technical support and help at My Digital Life Forums.
Related Articles
- Add Trailing Slash to the End of the URL with .htaccess Rewrite Rules
- Redirect or Rewrite to Remove Double or Multiple Slashes (//) in URL
- Headdress for Mac OS X Reviews
- Search Engine Spider Simulator SEO Tool
- How to Change Folder Thumbnail Preview Picture in Windows Vista Explorer
- Create Custom Webclips Easily for iPhone
- Change My Documents Folder Default Location Path in XP and Vista
- How to Move WordPress Blog to New Domain or Location
- How to Bookmark A Web Page Into Firefox 3 Bookmarks Folder When Clicking on Star on Location Bar
- Edit Internet Explorer Typed URLs in Address Bar Dropdown List
























May 8th, 2008 14:40
Yeah.. I’m thinking to move my blog from /blogs/ to the main root…ugh.. I’m just too scared to do it
June 19th, 2008 19:17
Thanks dude i tried and it worked fine for my site http://www.hurricanesoftwares.com but unfortunately it didn’t worked out for my other site. Wondering whats wrong.
Ash
August 21st, 2008 08:43
I’m kind of new to this but couldn’t you just do:
Redirect permanent /mylovelysite/ http://wwww.domain.com/