zoukankan      html  css  js  c++  java
  • IIS For Windows环境下的WP伪静态

    WP伪静态对于Linux主机是十分容易的事情,但在Windows主机IIS环境下就比较棘手了,你是否遇到了一样的问题呢?今天就来教你如何在Win主机IIS环境下进行WP伪静态配置。

    Windows主机IIS环境下伪静态需要主机启用了Rewrite模块,不然是不会起作用的。主机启用了Rewrite模块,剩下的只需要一个Httpd.ini就能解决问题了。

    httpd.ini是指wordpress程序在windows虚拟主机上的伪静态设置。下面就贴出WP伪静态的Httpd.ini代码:

    [ISAPI_Rewrite]

    # 3600 = 1 hour

    CacheClockRate 3600

    RepeatLimit 32

    # Protect httpd.ini and httpd.parse.errors files

    # from accessing through HTTP

    # Rules to ensure that normal content gets through

    RewriteRule /sitemap.xml /sitemap.xml [L]

    RewriteRule /favicon.ico /favicon.ico [L]

    RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]

    RewriteRule /sitemap.html /sitemap.html [L]

    RewriteRule /archivers/(.*) /archivers/$1 [L]

    # For file-based wordpress content (i.e. theme), admin, etc.

    RewriteRule /wp-(.*) /wp-$1 [L]

    # For normal wordpress content, via index.php

    RewriteRule ^/$ /index.php [L]

    RewriteRule /(.*) /index.php/$1 [L]

    把上面的代码复制保存为httpd.ini文件,上传至网站根目录即可。

  • 相关阅读:
    Python-异常处理机制
    递归函数——斐波那契数列j
    函数及相关操作
    字符串及相关操作
    集合及相关操作
    元组
    字典
    列表元素增删改排操作
    multiprocessing模块简单应用
    02 for循环创建进程
  • 原文地址:https://www.cnblogs.com/momi/p/2406525.html
Copyright © 2011-2022 走看看