WordPress伪静态规则设置代码实例


当前第2页 返回上一页

新建一个 txt 文件,将下面的代码添加到文件中,然后另存为 httpd.ini 文件,上传到WordPress站点的根目录即可。

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

参考链接Apache Module mod_rewrite


标签:WordPress

返回前面的内容

相关阅读 >>

wordpress评论ip地址显示为127.0.0.1的解决办法

wordpress之header设计

基于docker 搭建wordpress的方法

教你实现wordpress博客的“预加载”功能

wordpress调用当前分类下子分类的方法

wordpress中对访客评论功能的一些优化方法

讲解wordpress开发中一些常用的debug技巧

wordpress获取当前文章的评论数实现代码

wordpress抓取文章第一张远程图片保存到本地的方法

加速wordpress技巧redis缓存输出的html页面

更多相关阅读请进入《wordpress》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...