点击登录
  • 欢迎访问无限星辰技术博客,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏无限星辰吧
  • 好集导航开张了,传送门:好集导航

iis6上wordpress伪静态规则设置方法

互联网技术 crx349 6191次浏览 0个评论 扫描二维码

1、利用iis自带的httpd.ini文件

在网站根目录新建一个httpd.ini 内容如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[ISAPI_Rewrite]
 
# 3600 = 1 hour
CacheClockRate 3600
 
RepeatLimit 32
# ISAPI_Rewrite 1.3 版本 域名的301重定向
RewriteCond Host: ^xmspace.net$
RewriteRule (.*) http://www.xmspace.net$1 [I,R]
 
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# For tag(中文标签以及标签翻页的规则)
RewriteRule /tag/(.*)/page/(d+)$ /index.php?tag=$1&paged=$2
RewriteRule /tag/(.+)$ /index.php?tag=$1
# For category(中文分类以及分类翻页的规则)
RewriteRule /category/(.*)/page/(d+)$ /index.php?category_name=$1&paged=$2
RewriteRule /category/(.*) /index.php?category_name=$1
# For sitemapxml
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /sitemap.xml.gz /sitemap.xml.gz [L]
RewriteRule /robots.txt /robots.txt [L]
RewriteRule /favicon.ico /favicon.ico [L]
#子目录,如果不添加子目录会404
RewriteRule /webimg/(.*) /webimg/$1 [L]
RewriteRule /gg/(.*) /gg/$1 [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
RewriteRule /wp-admin/(.*) /wp-admin/$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]

无限星辰 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明iis6上wordpress伪静态规则设置方法!
喜欢 (0)
[]
分享 (0)

您必须 登录 才能发表评论!