Chinaunix首页 | 论坛 | 博客
  • 博客访问: 87660
  • 博文数量: 56
  • 博客积分: 1647
  • 博客等级: 上尉
  • 技术积分: 675
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-24 11:01
文章分类

全部博文(56)

文章存档

2014年(2)

2013年(1)

2012年(53)

我的朋友

分类: IT业界

2012-04-28 09:48:00

对于服务器,众多站长都已经了解了不少了。现在对于win2003的服务器,一般主流空间商装的都是IIS6.0web服务器,一般很多初级用户都会认为win主机支持php伪静态不太好,其实不是,是很多人不明白怎么设置罢了,比如:WordPress如何在win系统下实现伪静态,专营的天下数据下面就详细给大家说明一下:

首先你先问你空间商,你购买的空间支持不支持伪静态,一般购买的付费空间/虚拟主机都是支持的。如果支持的话,就创建一个httpd.ini文件 ,把下面代码保存到该文件中,上传到网站的根目录就可以了。然后,之后进入WP后台修改固定链接,比如修改为:/%category%/%post_id%.html ,很简单吧。

[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]

这个规则文件的写法是IIS6.0下最新的wordpress伪静态规则。一般win主机都是IIS6.0web服务器 ,而不是Apache的,在IIS服务器下,像一些常见的wordpress博客、shopex网店系统等第三方知名第三方程序,伪静态的实现,自己只需要把网站的静态化规则文件命名为httpd.ini文件放在网站根目录就可以了,无须通过网站后台设置,那是在Linux系统下的Apache服务器下才那样设置的。以上便是天下数据今天谈论的:WordPress如何在win系统下实现伪静态的全部内容了。

 

阅读(544) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~