wordpress博客
FlashFXP工具
编辑httpd.ini规则 下载或者在线编辑httpd.ini文件,在原来规则中增加一条代码RewriteRule /bbs/(.*) /bbs/$1 [L],增加后完整规则如下(/bbs/是二级目录名,具体名称是什么就写什么,注意是双斜杠): [ISAPI_Rewrite]# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32RewriteRule /tag/(.*) /index\.php\?tag=$1# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTP# Rules to ensure that normal content gets throughRewriteRule /robots.txt /robots.txt [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.phpRewriteRule /bbs/(.*) /bbs/$1 [L]RewriteRule ^/$ /index.php [L]RewriteRule /(.*) /index.php/$1 [L] 上面增加的这条规则意思就是访问“/bbs/”都会转到“bbs”这个二级目录,也就是说我们访问http://www.chenxinseo.net/bbs/时就转到空间根目录下的bbs文件夹。
上传httpd.ini覆盖原文件 将httpd.ini文件上传覆盖原来的文件,刷新就可以了。
如果有多个子目录的话,也是可以的,设置几条这样的规则就行了。如:RewriteRule /文件夹名1/(.*) /文件夹名1/$1 [L]RewriteRule /文件夹名2/(.*) /文件夹名2/$1 [L]RewriteRule /文件夹名3/(.*) /文件夹名3/$1 [L] 这就是windows主机下wordpress博客伪静态后子目录无法访问的解决。一般来说,windows主机下wordpress博客的路径访问不正常,都与伪静态有关,只要解决伪静态,访问也就没问题了。实在不清楚,或者测试出问题的,可以联系贵阳SEO解决。
子目录文件夹一定要带双斜杠。