SEO Friendly Rewrite Method to Move Website URL From Subdirectory to Root Parent Folder Thân thiện SEO Rewrite Phương pháp Chuyển URL của trang web Từ subdirectory vào thư mục gốc của Phụ Huynh
You have set up your site, blog such as WordPress, Drupal, LiveJournal, or content management system such as Joomba and Mambo nicely at URL link such as http://www.domain.com/mylovelysite, and get decent traffic to the web site. Bạn đã thiết lập trang web của bạn, blog như WordPress, Drupal, LiveJournal, hoặc nội dung của hệ thống quản lý như Joomba Mambo và độc đáo tại địa chỉ liên kết như http://www.domain.com/mylovelysite, và nhận được lưu lượng truy cập đến decent web trang web. Now in the reorganization exercise, you decide to move the site from sub-directory to the parent folder, properly at site's root location instead. Bây giờ trong các tổ chức tập thể dục, bạn quyết định di chuyển các trang web từ thư mục con cho cha mẹ thư mục, ở đúng vị trí của trang web gốc để thay thế. Moving the site to another folder or root folder will break all links and backlinks referenced to your website. Di chuyển các trang web vào một thư mục khác hoặc thư mục gốc sẽ nghỉ tất cả các liên kết và backlinks tham chiếu đến trang web của bạn. If these broken links are not handled and redirected properly, there will be a lot of 404 page not found error, potentially drive away visitors, or in worst case, affect and lower the search engine ranking position (SERP). Nếu các liên kết bị đứt không được xử lý và chuyển hướng đúng đắn, sẽ có rất nhiều trang 404 không tìm thấy lỗi, có khả năng lái xe đi du khách, hoặc trong trường hợp xấu nhất, thấp hơn và ảnh hưởng đến các vị trí xếp hạng của công cụ tìm kiếm (SERP).
The best way to manage the change of site's URL due to movement of directory location is by using redirection feature provided by mod_rewrite module in Apache HTTPD web server. Cách tốt nhất để quản lý sự thay đổi địa chỉ của trang web của phong trào do các vị trí thư mục bằng cách sử dụng redirection là tính năng được cung cấp bởi mô-đun mod_rewrite trong Apache HTTPD web. Most web hosts using Apache web server supports mod_rewrite redirect by default, and can implement this trick with ease. Hầu hết các trang web bằng cách sử dụng máy chủ web Apache hỗ trợ mod_rewrite chuyển hướng theo mặc định, và có thể thực hiện việc này dễ dàng lừa. Else you will need to enable and turn on mod_rewrite module. Người nào khác, bạn sẽ cần phải kích hoạt và bật mod_rewrite mô-đun.
To redirect from a subdirectory or sub-folder to root directory, add the following line of text towards the top of .htaccess file located in the sub-directory to redirect all requests into that folder will be redirected to new location (ie root) properly. Để chuyển hướng từ một subdirectory hoặc tiểu thư mục để thư mục gốc, và thêm những dòng văn bản hướng tới trên đầu. Htaccess tập tin nằm trong thư mục con để yêu cầu tất cả các trang chuyển hướng vào thư mục đó sẽ được chuyển đến địa điểm mới (tức là người chủ) đúng . If the .htaccess file does not exist, create one. Nếu. Htaccess tập tin không tồn tại, tạo ra một.
<IfModule mod_rewrite.c> <IfModule Mod_rewrite.c>
RewriteEngine On RewriteEngine On
RewriteBase / RewriteBase /
RewriteRule ^mylovelysite/(.*)$ /$1 [R=301,NC,L] RewriteRule ^ mylovelysite /(.*)$ / $ 1 [R = 301, NC, L]
</IfModule> </ IfModule>
Replace mylovelysite in the forth line above with the directory name on your website's URL. Thay thế mylovelysite trong dòng ra ở trên với các tên thư mục trên trang web của bạn của URL. These line in .htaccess will redirect requests for the /mylovelysite sub-directory to the root directory by stripping “mylovelysite/” out of the URL. Những dòng. Htaccess sẽ chuyển hướng các yêu cầu cho các / mylovelysite thư mục con vào thư mục gốc của stripping "mylovelysite /" ra khỏi URL. For example, a visit to http://www.domain.com/mylovelysite/index.html will get redirected to http://www.domain.com/index.html, instead of returning an 404 error. Ví dụ, một chuyến viếng thăm http://www.domain.com/mylovelysite/index.html sẽ được chuyển đến http://www.domain.com/index.html, thay vì trả lại một lỗi 404. This is useful for visitors who come to your site via bookmark or favorite, or those find your web pages via search engines that haven't re-crawled, re-spidered and refreshed with the new URLs in their search indexes in the initial days after moving. Điều này rất hữu ích cho du khách những người đi vào trang web của bạn thông qua hay đánh dấu trang yêu thích, hoặc những người tìm thấy các trang web của bạn thông qua công cụ tìm kiếm mà lại không có thu thập thông tin, lại spidered và làm mới với các URL mới trong danh mục tìm kiếm của họ trong ngày đầu tiên sau khi di chuyển.
However, the movement will still likely to affect your site's search engine rankings. Tuy nhiên, phong trào sẽ vẫn còn khả năng ảnh hưởng đến trang web của công cụ tìm kiếm của Rankings. The rewrite rules above make sure of 301 permanent redirect to ensure that the PageRank or ranking will pass over to the new URLs for search engine optimization (SEO). Các ghi đè quy định ở trên chắc chắn rằng các trang chuyển hướng 301 vĩnh viễn để đảm bảo rằng các trang hay xếp hạng sẽ vượt qua để các URL mới, tối ưu hóa cho công cụ tìm kiếm (SEO). Until the new site structures get fully reindexed, the organic traffic from search engines may be reduced temporarily. Cho đến khi trang web mới nhận được đầy đủ các cấu trúc reindexed, các lưu lượng truy cập từ các công cụ tìm kiếm có thể được giảm tạm thời.
IMPORTANT : The page is machine translated and provided "as is" without warranty. Lưu ý: Các trang web là máy tính dịch và cung cấp "như là" mà không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể là khó hiểu. Please refer to Xin vui lòng tham khảo original English article Tiếng Anh bản gốc bài viết whenever possible. bất cứ khi nào có thể.
Related Articles Bài viết liên quan
- Add Trailing Slash to the End of the URL with .htaccess Rewrite Rules Thêm Trailing Slash đến cuối cùng của URL với. Htaccess Rewrite Nội quy
- Redirect or Rewrite to Remove Double or Multiple Slashes (//) in URL Chuyển hướng hoặc Rewrite để Hủy bỏ đôi hoặc nhiều Slashes (/ /) trong URL
- How to Move WordPress Blog to New Domain or Location Làm thế nào để Chuyển WordPress Blog đến mới Tên miền hoặc địa điểm
- How to Get Linux Server Sends Email Alert on Root Login Làm thế nào để Nhận Linux Server Gửi email Thông báo về gốc Đăng nhập
- Reset the Root Password of MySQL Server Thiết lập lại mật khẩu của MySQL Server
- Disable Direct Root Login and User Access via SSH to Server Đăng nhập Tên đăng nhập trực tiếp vô hiệu hóa gốc và người dùng truy cập vào máy chủ thông qua SSH
- Slow File and Folder Copy, Move, Transfer or Delete Operation Speed Problem in Vista Fix Chậm Sao chép tập tin và thư mục, di chuyển, chuyển giao hoặc Xóa Tốc độ hoạt động trong vấn đề Vista Fix
- Change and Reset MySQL root Password Thiết lập lại và thay đổi mật khẩu MySQL gốc
- Tips of How to Delete Folder Contents While Maintaining Folder Tree Structure in Windows XP PC Lời khuyên của Làm thế nào để Xóa Thư mục Nội dung Trong khi Duy trì cấu trúc cây thư mục trong Windows XP máy PC
- Attempt to Reveal Microsoft Xbox 360 Failure Root Cause Cố gắng để hiện của Microsoft Xbox 360 Không Root, Nguyên nhân










































February 17th, 2009 17:40 17 tháng hai, 2009 17:40
Very nice information. Thông tin rất đẹp. Thanks for share.Look forward to reading more from you in the future. Cảm ơn bạn đã share.Look chuyển tiếp để đọc thêm từ bạn trong tương lai.
October 16th, 2008 04:13 16 tháng mười, 2008 04:13
Wow, this is a great post. Wow, đây là một bài đăng. Thanks for the information, this is often times an issue that comes up and I can never find a good resource to do this. Cảm ơn bạn đã thông tin, điều này thường là một lần một vấn đề mà đi lên và tôi không bao giờ có thể tìm thấy một nguồn lực tốt để làm điều này. Make sure you don't have a ton of links to your sub directory though because some value could be lost. Hãy chắc chắn rằng bạn không có một tấn các đường liên kết tới thư mục phụ của bạn bởi vì một số giá trị mặc dù có thể bị mất.
October 9th, 2008 22:56 9 tháng mười, 2008 22:56
Danke für das schöne Beispiel. Danke für das schöne Beispiel. Das hat uns wirklich weiter geholfen. Das hat uns Thật sao weiter geholfen. Nach einer kleinen Abänderung funktioniert unsere Weiterleitung endlich so wie wir es wollten. Nach einer kleinen Abänderung funktioniert unsere Weiterleitung endlich để wie es wir wollten.
September 26th, 2008 23:15 26 tháng chín, 2008 23:15
hi chào
i have already redirect my primary domain to a subfolder “/folder”. tôi đã chuyển hướng chính tên miền của tôi vào một con "/ thư mục". Is it possible to hide the “/folder” name on the url ??? Là nó có thể ẩn "/ thư mục" tên trên url?
For example i want primarydomain.com/index.php instead of primarydomain.com/folder/index.php Ví dụ như tôi muốn primarydomain.com / index.php thay vì primarydomain.com / thư mục / index.php
August 30th, 2008 15:07 30 tháng tám, 2008 15:07
[...] htaccess, but most do). [...] Htaccess, nhưng hầu hết không). If you don't have that file in your root directory you can create one. Nếu bạn không có tập tin trong thư mục gốc của bạn, bạn có thể tạo ra một. This site should help with specifics. Trang web này sẽ giúp đỡ trong việc cụ thể. __________________ kristarella.com __________________ Kristarella.com
August 21st, 2008 08:43 21 tháng tám, 2008 08:43
I'm kind of new to this but couldn't you just do: Tôi là loại hình mới này, nhưng có thể bạn không chỉ cần làm:
Redirect permanent /mylovelysite/ Chuyển hướng cố định / mylovelysite / http://wwww.domain.com/ http://wwww.domain.com/
June 19th, 2008 19:17 Tháng sáu 19, 2008 19:17
Thanks dude i tried and it worked fine for my site Thanks dude tôi đã cố gắng và làm việc tốt cho trang web của tôi http://www.hurricanesoftwares.com http://www.hurricanesoftwares.com but unfortunately it didn't worked out for my other site. nhưng tiếc là nó không làm việc cho tôi trang web khác. Wondering whats wrong. Wondering whats wrong.
Ash Ash
May 8th, 2008 14:40 8 tháng năm, 2008 14:40
Yeah.. Yeah .. I'm thinking to move my blog from /blogs/ to the main root…ugh.. Tôi đang suy nghĩ để di chuyển từ các blog / blog / vào chính gốc ... ugh .. I'm just too scared to do it I'm just too scared to do it