- LoadModule rewrite_module libexec/mod_rewrite.so
- AddModule 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: 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:
- # Destoon B2B Rewrite Rules
- ErrorDocument 404/404 .php
- RewriteEngine On
- RewriteBase/
- RewriteRule ^ (. *) \. (asp | aspx | asa | asax | dll | jsp | cgi | fcgi | pl) (. *) $/404.php
- RewriteRule ^ (. *)/file/(. *) \. php (. *) $/404.php
- RewriteRule ^ (. *)-htm-(. *) $ 1.php? $2
- RewriteRule ^ (. *)/show-([0-9] +) ([\-])? ([0-9] + )? \. Html $1/show. php? Itemid = $2 & page = $4
- RewriteRule ^ (. *)/list-([0-9] +) ([\-])? ([0-9] + )? \. Html $1/list. php? Catid = $2 & page = $4
- RewriteRule ^ (. *)/show/([0-9] +)/([0-9] + )? ([/])? $1/show. php? Itemid = $2 & page = $3
- RewriteRule ^ (. *)/list/([0-9] +)/([0-9] + )? ([/])? $1/list. php? Catid = $2 & page = $3
- RewriteRule ^ (. *)/([A-za-z0-9 _ \-] +)-c ([0-9] +)-([0-9] + )\. html $1/list. php? Catid = $3 & page = $4
- RewriteRule ^ (. *)/([a-z] +)/(. *) \. shtml $1/$2/index. php? Rewrite = $3
- RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] + )/(. *)\. html $1/index. php? Homepage = $2 & file = $3 & rewrite = $4
- RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] +) ([/])? $1/index. php? Homepage = $2 & file = $3
- RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +) ([/])? $1/index. php? Homepage = $2
3. Nginx rules (refer to 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 (see 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.php
- Endif
- Match URL into $ with ^ (. *)/file/(. *) \. php (. *) $
- If matched then
- Set URL =/404.php
- Endif
- Match URL into $ with ^ (. *)-htm-(. *) $
- If matched then
- Set URL = $ 1.php? $2
- Endif
- Match URL into $ with ^ (. *)/show-([0-9] +) ([\-])? ([0-9] + )? \. Html $
- If matched then
- Set URL = $1/show. php? Itemid = $2 & page = $4
- Endif
- Match URL into $ with ^ (. *)/list-([0-9] +) ([\-])? ([0-9] + )? \. Html $
- If matched then
- Set URL = $1/list. php? Catid = $2 & page = $4
- Endif
- Match URL into $ with ^ (. *)/show/([0-9] +)/([0-9] + )? ([/])? $
- If matched then
- Set URL = $1/show. php? Itemid = $2 & page = $3
- Endif
- Match URL into $ with ^ (. *)/list/([0-9] +)/([0-9] + )? ([/])? $
- If matched then
- Set URL = $1/list. php? Catid = $2 & page = $3
- Endif
- Match URL into $ with ^ (. *)/([A-za-z0-9 _ \-] +)-c ([0-9] +)-([0-9] + )\. html $
- If matched then
- Set URL = $1/list. php? Catid = $3 & page = $4
- Endif
- Match URL into $ with ^ (. *)/([a-z] +)/(. *) \. shtml $
- If matched then
- Set URL = $1/$2/index. php? Rewrite = $3
- Endif
- Match URL into $ with ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] +)/(. *) \. html $
- If matched then
- Set URL = $1/index. php? Homepage = $2 & file = $3 & rewrite = $4
- Endif
- Match URL into $ with ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] +) ([/])? $
- If matched then
- Set URL = $1/index. php? Homepage = $2 & file = $3
- Endif
- Match URL into $ with ^ (. *)/com/([a-z0-9 _ \-] +) ([/])? $
- If matched then
- Set URL = $1/index. php? Homepage = $2
- Endif
5. IIS6 server please download idea (see http://download.destoon.com/rewrite/httpd.ini ):
[ISAPI_Rewrite]
- # Destoon B2B www.destoon.com
- #3600 = 1 hour
- CacheClockRate 3600
RepeatLimit 32
# Protect httpd. ini and httpd. parse. errors files
- # From accessing through HTTP
- RewriteRule ^ (. *) \. (asp | aspx | asa | asax | dll | jsp | cgi | fcgi | pl) (. *) $/404 \. php
- RewriteRule ^ (. *)/file/(. *) \. php (. *) $/404 \. php
- RewriteRule ^ (. *)-htm-(. *) $1 \. php \? $2
- RewriteRule ^ (. *)/show-([0-9] +) ([\-])? ([0-9] + )? \. Html $1/show \. php \? Itemid = $2 & page = $4
- RewriteRule ^ (. *)/list-([0-9] +) ([\-])? ([0-9] + )? \. Html $1/list \. php \? Catid = $2 & page = $4
- RewriteRule ^ (. *)/show/([0-9] +)/([0-9] + )? ([/])? $1/show \. php \? Itemid = $2 & page = $3
- RewriteRule ^ (. *)/list/([0-9] +)/([0-9] + )? ([/])? $1/list \. php \? Catid = $2 & page = $3
- RewriteRule ^ (. *)/([A-za-z0-9 _ \-] +)-c ([0-9] +)-([0-9] + )\. html $1/list \. php \? Catid = $3 & page = $4
- RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] + )/(. *)\. html $1/index \. php \? Homepage = $2 & file = $3 & rewrite = $4
- RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +)/([a-z] +) ([/])? $1/index \. php \? Homepage = $2 & file = $3
- RewriteRule ^ (. *)/com/([a-z0-9 _ \-] +) ([/])? $1/index \. php \? Homepage = $2
- 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 |