本帖最后由 阿威 于 2017-5-9 19:49 编辑
帮你到这了,善用搜索引擎
IIS环境下配置Rewrite规则:http://faq.comsenz.com/viewnews-11
IIS wordpress 伪静态规则:(https://www.wpdaxue.com/wordpress-rewriterule.html)
新建一个 txt 文件,将下面的代码添加到文件中,然后另存为 httpd.ini 文件,上传到WordPress站点的根目录:
- [ISAPI_Rewrite]
- # Defend your computer from some worm attacks
- #RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
- # 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 /tag/(.*) /index\.php\?tag=$1
- RewriteRule /software-files/(.*) /software-files/$1 [L]
- RewriteRule /images/(.*) /images/$1 [L]
- RewriteRule /sitemap.xml /sitemap.xml [L]
- RewriteRule /favicon.ico /favicon.ico [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]
复制代码
|