开发者社区> 问答> 正文

apache伪静态与iis伪静态有区别吗?

已解决

展开
收起
我的中国 2016-02-01 16:08:03 3097 0
1 条回答
写回答
取消 提交回答
  • R&S网络资深工程师 ,阿里云论坛官方版主,阿里云云计算ACP,春考教学网站长,IT技术晋级之路专辑作者
    采纳回答

    在我开时打开模式不一样:
    apache的.htaccess配置文件是以:RewriteEngine On 将写模式打开。
    Apache伪静态html(URL Rewrite)设置法
    phpma一 打开 Apache 的配置文件 httpd.conf 。
    phpma二 将#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
    phpma三 在 httpd.conf中添加:

    RewriteEngine On
    #RewriteCond %{ENV:SCRIPT_URL} (?:index|dispbbs)[-0-9]+.html
    RewriteRule ^(.*?(?:index|dispbbs))-([-0-9]+).html$ $1.php?

    __is_apache_rewrite=1&__rewrite_arg=$2

    iis的httpd.ini配置文件是以:[ISAPI_Rewrite] 将写模式打开。
    打开你的httpd.ini,找到
    [ISAPI_Rewrite]

    3600 = 1 hour

    CacheClockRate 3600
    RepeatLimit 32

    Protect httpd.ini and httpd.parse.errors files

    from accessing through HTTP

    RewriteRule ^(.*)/archiver/([a-z0-9-]+.html)$ $1/archiver/index.php?$2
    RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html$ $1/forumdisplay.php?fid=$2&page=$3
    RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3
    RewriteRule ^(.*)/profile-(username|uid)-(.+?).html$ $1/viewpro.php?$2=$3

    2019-07-17 18:27:38
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Apache Flink技术进阶 立即下载
Apache Spark: Cloud and On-Prem 立即下载
Hybrid Cloud and Apache Spark 立即下载

相关镜像