php Pseudo Static IIS Articles

  • 2021-06-28 11:41:14
  • OfStack

Some win hosts IIS do not support.htaccess files. What I am referring to here is not that apmserv servers can use.htaccess files locally. php pseudo-static can be seen using apmserv server environment configuration (url rewrite mod_rewrite Rewrite) This article is very detailed.

Here we will focus on httpd.ini nonsense without looking directly at the effect~

Example: www.ofstack.com/index.php
We want him to use www.ofstack.com/index.html for direct access
www.ofstack.com/newxx.php?=10 [newxx.php is the news detail page]
We make him pseudostatic www.ofstack.com/new-10.html
The implementation is as follows: Source file of httpd.ini

[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 The example above shows that RewriteRule/index.html/index.php converts index.php to index.html
RewriteRule/new-([0-9]+). html$/newxx.php\?uid=$1 converts to new-10 {this 10 is the value of id=how many}.html

It's easy.This pseudo-static 1 general win host's space quotient is basically supported!


Related articles: