Phpcms2008 enterprise yellow pages pseudo-static rules [apache, iis, apache virtual host]

Source: Internet
Author: User
Tags ini

Phpcms2008 enterprise yellow pages pseudo-static rules Apache Web Server (virtual host user)

# Enable RewriteEngine mode
RewriteEngine On
RewriteBase/yp

# Do not modify Rewrite system rules
RewriteRule into job-list-(%0-9%%%%%-(%0-9%%%%%%-(.%%%%.html $ job. php? Action = list & inputtime = $1 & station = $2 & genre = $3
RewriteRule restart ([a-z?##-(%0-9%%}.html $ 1.php? Action = show & id = $2
RewriteRule restart $ product. php? View_type = $1 & catid = $2 & pagesize = $3 & areaname = $4 & order = $5
RewriteRule restart $ product. php? View_type = $1 & catid = $2 & pagesize = $3 & areaname = $4 & order = $5 & page = $6
RewriteRule publish ([a-zjw00000000-list-(%0-942500000000.html $ 1.php? Action = list & catid = $2
RewriteRule implements show-(%0-9%%%%%-(%a-z%%%%%%%%%%%%%%%%%%.html $ web/show. php? Userid-$1/category-$2/id-$3.html

Phpcms2008 enterprise yellow pages pseudo-static rules IIS Web Server (Independent host user)


First, add this filter on IIS Isapi. The filter name is Rewrite. Select Rewrite. dll as the executable file and restart IIS. Httpd. ini has been set in the attachment. The content is as follows:

 

[ISAPI_Rewrite]

#3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd. ini and httpd. parse. errors files
# From accessing through HTTP
RewriteRule ^ (. *)/job-list-(%0-9%%*-(%0-9%%%%%-(.%%%%.html $1/job. php? Action = list & inputtime = $2 & station = $3 & genre = $4 RewriteRule ^ (. *)/(%a-z%%%%%-(%0-9%%%%%%.html $1/$ 2.php? Action = show & id = $3 RewriteRule ^ (. *)/Logs $1/product. php? View_type = $2 & catid = $3 & pagesize = $4 & areaname = $5 & order = $6 RewriteRule ^ (. *)/clusters $1/product. php? View_type = $2 & catid = $3 & pagesize = $4 & areaname = $5 & order = $6 & page = $7 RewriteRule ^ (. *)/([a-z1_00000000-list-(0-0-91_00000000.html $1/$ 2.php? Action = list & catid = $3
RewriteRule ^ (. *)/show-(%0-9%%%}-(%a-z%%%%%%-(%0-9%%%%%%.html $1/web/show. php? Userid-$2/category-$3/id-00004.html

Phpcms2008 enterprise yellow pages pseudo-static rules Apache Web Server (Independent host user)

First, determine the Apache version you are using and whether the mod_rewrite module is loaded.
For Apache 1.x users, check whether the following two sections of code exist in conf/httpd. conf:
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 yes, add the following code to the configuration file (usually conf/httpd. conf. Note that if the website is defined by a virtual host, you must add it to the virtual host configuration, that is, <VirtualHost>. If it is added to the virtual host configuration, it may not be available. After modification, restart Apache.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^ (. *)/job-list-(%0-9%%*-(%0-9%%%%%-(.%%%%.html $1/job. php? Action = list & inputtime = $2 & station = $3 & genre = $4
RewriteRule ^ (. *)/(%a-z%%%)-(%0-9%%%%%%.html $1/$ 2.php? Action = show & id = $3
RewriteRule ^ (. *)/keys $1/product. php? View_type = $2 & catid = $3 & pagesize = $4 & areaname = $5 & order = $6
RewriteRule ^ (. *)/keys $1/product. php? View_type = $2 & catid = $3 & pagesize = $4 & areaname = $5 & order = $6 & page = $7
RewriteRule ^ (. *)/(%a-z%%%%-list-(%0-9%%%%%%.html $1/$ 2.php? Action = list & catid = $3
RewriteRule ^ (. *)/show-(%0-9%%%}-(%a-z%%%%%%-(%0-9%%%%%%.html $1/web/show. php? Userid-$2/category-$3/id-00004.html
</IfModule>
If mod_rewrite is not installed, you can recompile Apache, add -- enable-rewrite = shared to the configure content, and then add the above code to the Apache configuration file.

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.