有一部分同学在设置 wordpress 插件以后,出现链接不能访问的情况,请按照以下办法解决:
以下方法适用于 Windows 平台下的程序,如果是 Linux 平台请参考2楼的帖子:
方法一:新建一个记事本,将以下文件粘贴到记事本里面,然后保存为 httpd.ini ,并上传到网站根目录。
- [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]
- RewriteRule /wap(.*) /wap$1 [L]
- # For normal wordpress content, via index.php
- RewriteRule ^/$ /index.php [L]
- RewriteRule /(.*) /index.php/$1 [L]
评论0