我们在使用wordpress的时候,经常会因为链接中带着的index.php烦恼无比,因为对于蜘蛛引擎来说,链接越短越好,这样更有利于优化!
作为SEOer,一般都有些强迫症,所以,我们在操作的时候,必然想着把这些/index.php/删除掉,那么,今天我来给大家分享一下,wordpress建站去除链接中的/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]
把上述代码直接然后复制到txt文件中,然后把txt文件上传到网站根目录,并且把文件名改为httpd.ini,再把固定链接设置中的index.php去掉,就可以了!
再打开网站的时候,你会发现所有的链接中的index.php就被全部去掉了
- 微信赞赏老师
- 互联网营销培训课程
-
- 苏春宇微信号
- 183 6469 9738
-