How to set URLRewrite (pseudo static) in destoon

Source: Internet
Author: User
How to set URLRewrite (pseudo static) in destoon

  1. LoadModule rewrite_module libexec/mod_rewrite.so
  2. AddModule mod_rewrite.c

For Apache 2.x users, check whether the following code exists in conf/httpd. conf:

  1. LoadModule rewrite_module modules/mod_rewrite.so

If it exists and starts with #, delete #. Then add the following code in the configuration file (usually conf/httpd. conf or conf/extra/httpd-vhosts.conf.

Note: If the website is defined by a VM, add it to the VM configuration, that is . After modification, restart Apache. Apache conf file configuration (see http://download.destoon.com/rewrite/apache.txt) rules:

  1. # Destoon B2B Rewrite Rules
  2. ErrorDocument 404/404 .php
  3. RewriteEngine On
  4. RewriteBase/
  5. RewriteRule ^ (. *) \. (asp | aspx | asa | asax | dll | jsp | cgi | fcgi | pl) (. *) $/404.php
  6. RewriteRule ^ (. *)/file/(. *) \. php (. *) $/404.php
  7. RewriteRule ^ (. *)-htm-(. *) $ 1.php? $2
  8. RewriteRule ^ (. *)/show-([0-9] +) ([\-])? ([0-9] + )? \. Html $1/show. php? Itemid = $2 & page = $4
  9. RewriteRule ^ (. *)/list-([0-9] +) ([\-])? ([0-9] + )? \. Html $1/list. php? Catid = $2 & page = $4
  10. RewriteRule ^ (. *)/show/([0-9] +)/([0-9] + )? ([/])? $1/show. php? Itemid = $2 & page = $3
  11. RewriteRule ^ (. *)/list/([0-9] +)/([0-9] + )? ([/])? $1/list. php? Catid = $2 & page = $3
  12. RewriteRule ^ (. *)/([A-za-z0-9 _ \-] +)-c ([0-9] +)-([0-9] + )\. html $1/list. php? Catid = $3 & page = $4
  13. RewriteRule ^ (. *)/([a-z] +)/(. *) \. shtml $1/$2/index. php? Rewrite = $3
  14. RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] + )/(. *)\. html $1/index. php? Homepage = $2 & file = $3 & rewrite = $4
  15. RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] +) ([/])? $1/index. php? Homepage = $2 & file = $3
  16. RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +) ([/])? $1/index. php? Homepage = $2

3. Nginx rules (refer to http://download.destoon.com/rewrite/nginx.txt ):

  1. Rewrite ^/(. *) \. (asp | aspx | asa | asax | dll | jsp | cgi | fcgi | pl) (. *) $/404.php last;
  2. Rewrite ^/(. *)/file/(. *) \. php (. *) $/404.php last;
  3. Rewrite ^/(. *)-htm-(. *) $/$ 1.php? $2 last;
  4. Rewrite ^/(. *)/show-([0-9] +) ([\-])? ([0-9] + )? \. Html $/$1/show. php? Itemid = $2 & page = $4 last;
  5. Rewrite ^/(. *)/list-([0-9] +) ([\-])? ([0-9] + )? \. Html $/$1/list. php? Catid = $2 & page = $4 last;
  6. Rewrite ^/(. *)/show/([0-9] +)/([0-9] + )? ([/])? $/$1/show. php? Itemid = $2 & page = $3 last;
  7. Rewrite ^/(. *)/list/([0-9] +)/([0-9] + )? ([/])? $/$1/list. php? Catid = $2 & page = $3 last;
  8. Rewrite ^ /(. *)/([A-za-z0-9 _ \-] +)-c ([0-9] +)-([0-9] + )\. html $/$1/list. php? Catid = $3 & page = $4 last;
  9. Rewrite ^ (. *)/([a-z] +)/(. *) \. shtml $1/$2/index. php? Rewrite = $3 last;
  10. Rewrite ^/(com)/([a-z0-9 _ \-] +)/([a-z] +)/(. *) \. html $/index. php? Homepage = $2 & file = $3 & rewrite = $4 last;
  11. Rewrite ^/(com)/([a-z0-9 _ \-] +)/([a-z] +) ([/])? $/Index. php? Homepage = $2 & file = $3 last;
  12. Rewrite ^/(com)/([a-z0-9 _ \-] +) ([/])? $/Index. php? Homepage = $2 last;

4. Zeus rules (see http://download.destoon.com/rewrite/zeus.txt ):

  1. Match URL into $ with ^ (. *) \. (asp | aspx | asa | asax | dll | jsp | cgi | fcgi | pl) (. *) $
  2. If matched then
  3. Set URL =/404.php
  4. Endif
  5. Match URL into $ with ^ (. *)/file/(. *) \. php (. *) $
  6. If matched then
  7. Set URL =/404.php
  8. Endif
  9. Match URL into $ with ^ (. *)-htm-(. *) $
  10. If matched then
  11. Set URL = $ 1.php? $2
  12. Endif
  13. Match URL into $ with ^ (. *)/show-([0-9] +) ([\-])? ([0-9] + )? \. Html $
  14. If matched then
  15. Set URL = $1/show. php? Itemid = $2 & page = $4
  16. Endif
  17. Match URL into $ with ^ (. *)/list-([0-9] +) ([\-])? ([0-9] + )? \. Html $
  18. If matched then
  19. Set URL = $1/list. php? Catid = $2 & page = $4
  20. Endif
  21. Match URL into $ with ^ (. *)/show/([0-9] +)/([0-9] + )? ([/])? $
  22. If matched then
  23. Set URL = $1/show. php? Itemid = $2 & page = $3
  24. Endif
  25. Match URL into $ with ^ (. *)/list/([0-9] +)/([0-9] + )? ([/])? $
  26. If matched then
  27. Set URL = $1/list. php? Catid = $2 & page = $3
  28. Endif
  29. Match URL into $ with ^ (. *)/([A-za-z0-9 _ \-] +)-c ([0-9] +)-([0-9] + )\. html $
  30. If matched then
  31. Set URL = $1/list. php? Catid = $3 & page = $4
  32. Endif
  33. Match URL into $ with ^ (. *)/([a-z] +)/(. *) \. shtml $
  34. If matched then
  35. Set URL = $1/$2/index. php? Rewrite = $3
  36. Endif
  37. Match URL into $ with ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] +)/(. *) \. html $
  38. If matched then
  39. Set URL = $1/index. php? Homepage = $2 & file = $3 & rewrite = $4
  40. Endif
  41. Match URL into $ with ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] +) ([/])? $
  42. If matched then
  43. Set URL = $1/index. php? Homepage = $2 & file = $3
  44. Endif
  45. Match URL into $ with ^ (. *)/com/([a-z0-9 _ \-] +) ([/])? $
  46. If matched then
  47. Set URL = $1/index. php? Homepage = $2
  48. Endif

5. IIS6 server please download idea (see http://download.destoon.com/rewrite/httpd.ini ):

  1. [ISAPI_Rewrite]

  2. # Destoon B2B www.destoon.com
  3. #3600 = 1 hour
  4. CacheClockRate 3600

  5. RepeatLimit 32

  6. # Protect httpd. ini and httpd. parse. errors files

  7. # From accessing through HTTP
  8. RewriteRule ^ (. *) \. (asp | aspx | asa | asax | dll | jsp | cgi | fcgi | pl) (. *) $/404 \. php
  9. RewriteRule ^ (. *)/file/(. *) \. php (. *) $/404 \. php
  10. RewriteRule ^ (. *)-htm-(. *) $1 \. php \? $2
  11. RewriteRule ^ (. *)/show-([0-9] +) ([\-])? ([0-9] + )? \. Html $1/show \. php \? Itemid = $2 & page = $4
  12. RewriteRule ^ (. *)/list-([0-9] +) ([\-])? ([0-9] + )? \. Html $1/list \. php \? Catid = $2 & page = $4
  13. RewriteRule ^ (. *)/show/([0-9] +)/([0-9] + )? ([/])? $1/show \. php \? Itemid = $2 & page = $3
  14. RewriteRule ^ (. *)/list/([0-9] +)/([0-9] + )? ([/])? $1/list \. php \? Catid = $2 & page = $3
  15. RewriteRule ^ (. *)/([A-za-z0-9 _ \-] +)-c ([0-9] +)-([0-9] + )\. html $1/list \. php \? Catid = $3 & page = $4
  16. RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] + )/(. *)\. html $1/index \. php \? Homepage = $2 & file = $3 & rewrite = $4
  17. RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] +) ([/])? $1/index \. php \? Homepage = $2 & file = $3
  18. RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +) ([/])? $1/index \. php \? Homepage = $2
  19. RewriteRule ^ (. *)/([a-z] +)/(. *) \. shtml $1/$2/index \. php \? Rewrite = $3

6. IIS7 server rules (refer to the http://download.destoon.com/rewrite/web.config.txt) are:

After the Rewrite takes effect, go to website background = Website Settings = SEO optimization = URL Rewrite and select "enable" to submit. Go to the modules of each module and set "SEO settings" to select the corresponding pseudo-static address rule, and select "update address" to submit the rule.

The preceding example introduces the destoon URL Rewrite (pseudo static) setting method, which is helpful to you.

Recommended: destoon getting started tutorials and tips

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.