Home  >  Article  >  Backend Development  >  PHP Pseudo-Static IIS Chapter_PHP Tutorial

PHP Pseudo-Static IIS Chapter_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 10:29:06881browse

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

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

Example: www.jb51.net/index.php
We want him to use www.jb51.net/index.html to directly access
www.jb51.net/newxx.php?=10 [ newxx.php is the news detailed page]
We make it pseudo-statically www.jb51.net/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/779160.htmlTechArticleSome win host IIS 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...
Statement:
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