怎样去除WORDPRESS网址中的index.php

凡云阁感觉这会影响用户体验度,所以我们要想办法将index.php去掉。那怎样才能去除wordpress网址中的index.php呢? 方法一: 新建一个记事本,写入以下代码。 [cc ang="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] RewriteRule /xmlrpc.php /xmlrpc.php [L] [/cc] 然后将文件名改为:httpd.ini。并上传到网站根目录! 方法二: 将下面代码复制到文本文件,然后将文件名更改为.htaccess。上传到网站要目录。 [CC ANG="PHP"] RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] [/CC]   进入wordpress后台,在固定链接的自定义设置中将index.php去掉,保存。 再次打开文章详情页,网址中就不会出现index.php了。]]>


本文固定链接: http://www.fanyun.ltd/264.html | 凡云阁

fanyun
作者:fanyun 于2017年08月14日发表 & 关键词: ,
除非注明 否则文章均为原创,转载请注明出处: 怎样去除WORDPRESS网址中的index.php | 凡云阁

怎样去除WORDPRESS网址中的index.php:等您坐沙发呢!

发表评论

亲,不支持纯字母、符号评论哦~