杭州seo培训(WordPress如何去掉链接中的index.php)
用户投稿
•
•
阅读 121
杭州seo培训:很多人可能只以为只要织梦里有index小尾巴,实则不然,其实用Win主机搭建出来的WordPress也会有index.php小尾巴。

Win主机搭建WordPress如何去掉链接中的index.php
它和织梦去除index.html小尾巴不一样,可以更为简便的轻松去除。很多站长对WP的index.php没什么研究,今天帮一朋友简单的弄了下,还是挺简单的,特地记录方法,以方便日后有需要用到的朋友。
打开记事本,把下面代码粘贴进去:
[ISAPI_Rewrite]
# 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 /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
将这个httpd.ini文件上传到WP程序所在的目录也就是与index.php在同一个目录内。
之后进入WP后台修改固定链接,比如:/%category%/%post_id%.html
刷新博客首页,打开文章链接就会发现这时候index.php已经消失不见了。
随机文章
SEO小小课堂网SEO教程
站长导航
关键词排名优化
网站内容优化
GEO培训
站长导航
友情链接交换
百度搜索“网赚联盟”即可找到本站,微信搜索“小小课堂网”关注小小课堂网公众号。网赚联盟( wangzhuan.org.cn )欢迎用户投稿,发布者:用户投稿,文章版权归作者所有,投稿文章不代表网赚联盟立场,中二少年发布为网赚联盟原创文章,转载请注明出处:https://wangzhuan.org.cn/115699.html

微信扫一扫
支付宝扫一扫