Implement ISAPI_Rewrite pseudo-static under php win host_PHP tutorial

WBOY
Release: 2016-07-13 10:29:05
Original
806 people have browsed it

Some win host iss does not support .htaccess files. What I am referring to here is not local. If you use apmserv server locally, you can use .htaccess files. To configure pseudo-static in apmserv server environment, you can see php pseudo-static (url rewrite mod_rewrite (rewrite) This article is very detailed.

Here we mainly explain httpd.ini. Let’s not talk nonsense and just look at the effect~

Example: www.del5.com/index.php
We want him to use www.del5.com/index.html to directly access
www.del5.com/newxx.php?=10 [ newxx.php is the news detailed page]
We make it pseudo-statically www.del5.com/new-10.html
The implementation process is as follows: httpd.ini source file

[ISAPI_Rewrite]
# 3600 = 1 hour
# CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^/httpd(?:.ini|.parse.errors).* [F,I,O]
RewriteRule /index.html /index.php
RewriteRule /new-([0-9] +).html$ /newxx.php?uid=$1 From the above example, we can see that RewriteRule /index.html /index.php converts index.php to index.html
RewriteRule /new-([0-9 ]+).html$ /newxx.php?uid=$1 Convert to new-10{This 10 is the value of id=}.html

It’s very simple. This kind of pseudo-static is basically supported by the space quotient of win host!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/778694.htmlTechArticleSome win host iss does not support .htaccess files. What I am referring to here is that if it is not local, use apmserv server. You can use .htaccess file and use apmserv server environment to configure pseudo-static...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template