标题 | win主机使用php.ini实现wordpress伪静态 |
范文 | 使用以下方法对win空间下的wordpress设置伪静态前,请先询问主机商是否支持伪静态(IIS Rewrite 组件),这个是IIS6.0下最新的wordpress伪静态规则。 win主机wordpress伪静态规则:(以下涉及的代码采自互联网) 1.创建一个php.ini文件(创建一个txt文件,然后得命名为php,更改.txt的后缀为.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] # For normal wordpress content, via index.php RewriteRule ^/$ /index.php [L] RewriteRule /(.*) /index.php/$1 [L] 2.保存后,把php.ini文件上传到网站根目录,然后登陆wordpress博客后台,在设置——固定链接中的自定义结构设置url形式即可。 提醒:要想使用wordpress程序建站的站长,最好还是选择linux+apache结构搭建的主机或用来搭配服务器环境,因为可以省下不少麻烦。 |
随便看 |
|
在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。