Destoon URLRewrite (pseudo-static) Setting Method _ php instance

Source: Internet
Author: User
This article mainly introduces the URLRewrite (pseudo static) Setting Method of destoon. For more information, see section 1. If the server supports. htaccess, you do not need to set, The. htaccess rule under the root directory of the website has been set.
The rule (reference http://download.destoon.com/rewrite/htaccess.txt) is:

# Destoon B2B Rewrite RulesErrorDocument 404 /404.phpRewriteEngine OnRewriteBase /RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.phpRewriteRule ^(.*)/file/(.*)\.php(.*)$ /404.phpRewriteRule ^(.*)-htm-(.*)$ $1.php?$2RewriteRule ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show.php?itemid=$2&page=$4RewriteRule ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list.php?catid=$2&page=$4RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3RewriteRule ^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$3&page=$4RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3RewriteRule ^(com)/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ index.php?homepage=$2&file=$3&rewrite=$4RewriteRule ^(com)/([a-z0-9_\-]+)/([a-z]+)([/])?$ index.php?homepage=$2&file=$3RewriteRule ^(com)/([a-z0-9_\-]+)([/])?$ index.php?homepage=$2

2. If yesApache server:

For Apache 1.x users, check whether the following two sections of code exist in conf/httpd. conf:

LoadModule rewrite_module  libexec/mod_rewrite.soAddModule mod_rewrite.c

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

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 that if the website is defined by a virtual host, add it to the virtual host configuration, that is . After modification, restart Apache.

Apache conf file configuration (see http://download.destoon.com/rewrite/apache.txt) Rules:

# Destoon B2B Rewrite RulesErrorDocument 404 /404.phpRewriteEngine OnRewriteBase /RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.phpRewriteRule ^(.*)/file/(.*)\.php(.*)$ /404.phpRewriteRule ^(.*)-htm-(.*)$ $1.php?$2RewriteRule ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show.php?itemid=$2&page=$4RewriteRule ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list.php?catid=$2&page=$4RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3RewriteRule ^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$3&page=$4RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ $1/index.php?homepage=$2&file=$3&rewrite=$4RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)([/])?$ $1/index.php?homepage=$2&file=$3RewriteRule ^(.*)/com/([a-z0-9_\-]+)([/])?$ $1/index.php?homepage=$2

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

rewrite ^/(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php last;rewrite ^/(.*)/file/(.*)\.php(.*)$ /404.php last;rewrite ^/(.*)-htm-(.*)$ /$1.php?$2 last;rewrite ^/(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ /$1/show.php?itemid=$2&page=$4 last;rewrite ^/(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ /$1/list.php?catid=$2&page=$4 last;rewrite ^/(.*)/show/([0-9]+)/([0-9]+)?([/])?$ /$1/show.php?itemid=$2&page=$3 last;rewrite ^/(.*)/list/([0-9]+)/([0-9]+)?([/])?$ /$1/list.php?catid=$2&page=$3 last;rewrite ^/(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$ /$1/list.php?catid=$3&page=$4 last;rewrite ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3 last;rewrite ^/(com)/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ /index.php?homepage=$2&file=$3&rewrite=$4 last;rewrite ^/(com)/([a-z0-9_\-]+)/([a-z]+)([/])?$ /index.php?homepage=$2&file=$3 last;rewrite ^/(com)/([a-z0-9_\-]+)([/])?$ /index.php?homepage=$2 last;

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

match URL into $ with ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ if matched then  set URL = /404.phpendifmatch URL into $ with ^(.*)/file/(.*)\.php(.*)$ if matched then  set URL = /404.phpendifmatch URL into $ with ^(.*)-htm-(.*)$ if matched then  set URL = $1.php?$2 endifmatch URL into $ with ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ if matched then  set URL = $1/show.php?itemid=$2&page=$4 endifmatch URL into $ with ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ if matched then  set URL = $1/list.php?catid=$2&page=$4 endifmatch URL into $ with ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ if matched then  set URL = $1/show.php?itemid=$2&page=$3 endifmatch URL into $ with ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ if matched then  set URL = $1/list.php?catid=$2&page=$3 endifmatch URL into $ with ^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$if matched then  set URL = $1/list.php?catid=$3&page=$4endifmatch URL into $ with ^(.*)/([a-z]+)/(.*)\.shtml$ if matched then  set URL = $1/$2/index.php?rewrite=$3 endifmatch URL into $ with ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ if matched then  set URL = $1/index.php?homepage=$2&file=$3&rewrite=$4 endifmatch URL into $ with ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)([/])?$ if matched then  set URL = $1/index.php?homepage=$2&file=$3 endifmatch URL into $ with ^(.*)/com/([a-z0-9_\-]+)([/])?$ if matched then  set URL = $1/index.php?homepage=$2 endif

5. IIS6 Server

Download http://download.destoon.com/rewrite/IIS_Rewrite.zip
Rules have been set, and operations are performed according to the readme.txt File Content
If the website supports the httpd. ini file, use the following rules (refer to the http://download.destoon.com/rewrite/httpd.ini ):

[ISAPI_Rewrite]# Destoon B2B www.destoon.com# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTPRewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404\.phpRewriteRule ^(.*)/file/(.*)\.php(.*)$ /404\.phpRewriteRule ^(.*)-htm-(.*)$ $1\.php\?$2RewriteRule ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show\.php\?itemid=$2&page=$4RewriteRule ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list\.php\?catid=$2&page=$4RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show\.php\?itemid=$2&page=$3RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list\.php\?catid=$2&page=$3RewriteRule ^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$ $1/list\.php\?catid=$3&page=$4RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ $1/index\.php\?homepage=$2&file=$3&rewrite=$4RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)([/])?$ $1/index\.php\?homepage=$2&file=$3RewriteRule ^(.*)/com/([a-z0-9_\-]+)([/])?$ $1/index\.php\?homepage=$2RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index\.php\?rewrite=$3

6. IIS7 Server

The rule (reference http://download.destoon.com/rewrite/web.config.txt) is:

<?xml version="1.0" encoding="UTF-8"?>
  
  
      
        
           
                
         
           
                
         
           
                
          
          
               
         
          
               
         
          
               
         
          
               
         
          
               
         
          
               
         
          
               
         
          
               
         
           
                
        
      
    
  
 


After the Rewrite takes effect, goWebsite background = website settings = SEO optimization = URL Rewrite, select "enable" to submit.

Then go to the module of each module and set "SEO Settings" to select the corresponding pseudo-static address rule.

Select "Update address" to submit.

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.