- 时间:2020-03-14 20:09 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:apache伪静态与iis伪静态规则与配置区别介绍
本文章来总结一下关于apache伪静态与iis伪静态区别介绍,主要讲到了一些规则的问题与配置区别,以后大家就可以直接在iis伪静态转换apache,反之也很简单哦。
[b]在我开时打开模式不一样[/b]:
apache的.htaccess配置文件是以:RewriteEngine On 将写模式打开。
Apache伪静态html(URL Rewrite)设置法
phpma一 打开 Apache 的配置文件 httpd.conf 。
phpma二 将#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
phpma三 在 httpd.conf中添加:
[url=http://www.1sucai.cn/article/29390.htm]http://www.1sucai.cn/article/29390.htm[/url]
[b]
区别
[/b]apache不需要网站域名,而iis需要网站域名,且IIS遇到需要重写的URL有问号(?)与点(.)时,需要增加()进行转义.
[b]区别如下[/b]:
iis:
RewriteRule ^(.*)/category(d+).html$ $1/index.php?catid=$2
apache:
RewriteRule ^category(d+).html$ index.php?catid=$1 [QSA,L]