Hãy chọn Truy cập mobile | Tiếp tục

Nét Đẹp Việt Nam

 Quên mật khẩu
 Register
Xem: 6347|Trả lời: 2

Tối ưu SEO URL bằng Discuz! X 1.5 và htaccess

[Lấy địa chỉ]
Đăng lúc 22-12-2010 22:25:28 | Xem tất |Chế độ đọc
(c) Seo Tip 2.0 by Discuz! Viet
lethihathu18.jpg
1. Mod Trend: SEO URL for Discuz! X 1.5
2. Edited files: 02 files
+  /source/function/function_core.php ( download the attached file )
+ .htaccess
  1. <Files ~ "^\.(htaccess|htpasswd)[        DISCUZ_CODE_0        ]quot;>
  2. deny from all
  3. </Files>
  4. # RewriteEngine
  5. RewriteEngine On

  6. RewriteBase /
  7. ##your forum folder. If your forum: www.netdepviet.org/discuz/ .
  8. ## the RewriteBase is: RewriteBase /discuz
  9. # Rewrite
  10. RewriteCond %{QUERY_STRING} ^(.*)$
  11. RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
  12. RewriteCond %{QUERY_STRING} ^(.*)$
  13. RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
  14. RewriteCond %{QUERY_STRING} ^(.*)$
  15. RewriteRule ^(\w+)-([0-9]+)/(.*)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
  16. RewriteCond %{QUERY_STRING} ^(.*)$
  17. RewriteRule ^(.*)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$2&$3&page=$3&%1
  18. RewriteCond %{QUERY_STRING} ^(.*)$
  19. RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
  20. RewriteCond %{QUERY_STRING} ^(.*)$
  21. RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
  22. RewriteCond %{QUERY_STRING} ^(.*)$
  23. RewriteRule ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2&%1
Sao chép mã
03. Login ACP and config like this

04. Update Cache and Enjoy
Đăng lúc 23-12-2010 23:42:13 | Xem tất
Bản này cũ rồi bạn thân ah.
Bản mới cho ông bạn thân đây http://discuzviet.net/thread/seo ... r-2-0-1528-1-1.html
Leech từ http://discuzviet.net thì cũng để cho ng ta cái link chứ
 Tác giả| Đăng lúc 31-12-2016 13:44:46 | Xem tất
#Redirect 301
Dùng trong trường hợp Khi chuyển domain từ abc.com sang xyz.com, không muốn index lại toàn bộ link cũ.
Trong file .htaccess của abc.com cấu hình:
Redirect 301 /vn/ http://xyz.com/vn/
Ví dụ khi NDV chuyển từ netdepviet.org/vn sang forum.netdepviet.org thì sẽ cấu hình trên htaccess.
  1. Redirect 301 /vn/ http://forum.netdepviet.org/
Sao chép mã
Bạn phải đăng nhập mới được đăng bài Đăng nhập | Register

Quy tắc điểm

Phòng tối|iPhone|Archiver|G+|Youtube|Facebook|Twitter|Contact| Netdepviet.org

GMT+7, 29-3-2024 05:58 AM , Processed in 0.017418 second(s), 19 queries .

Powered by Discuz! X3.2

© 2006 Made with in Hanoi,Vietnam and Contents are published by all members

Trả lời nhanh Lên trên Trở lại danh sách