-
-8 26
-
据说在linux环境下启动伪静态是件非常简单的事,不过我还没玩linux的经验,这里也不多说了,只是介绍下IIS环境下利用ReWrite组件实现wordpress伪静态的方法,这种方法不需要多余的步骤,只要空间商启用了Rewrite模块,我们自己再在网站的根目录上上传一个httpd.ini文件即可,微酷博客在这里就只提供httpd.ini规则的写法。
httpd.in文件是一个Rewrite规则,该规则如下:
[ISAPI_Rewrite]
# Defend your computer from some worm attacks
#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
# 3600 = 1 hourCacheClockRate 3600
RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets throughRewriteRule /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]把上面的内容复制到记事本里面,保存为httpd.ini文件,上传到wordpress网站根目录即可,另外如果ReWrite组件已经成功加载,httpd.ini也上传无误但不能实现伪静态请参考:Rewrite加载成功DZ伪静态却无效
本文永久链接地址: http://www.vcoo.me/show/1241.html
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
1楼 影徒随我行 http://www.52honghu.com
Post:2010-1-28 0:45:35
就是在FTP的根目录下 我创了个down的上传些文件想下载
但是都是提示是404的错误页面,正因为如此现在转用404来做伪静态了
这个有什么好方法么