wordpress去除index.php的方法:首先登录wordpress后台;然后依次选择“设置-固定链接”并设置好链接;接着设置wordpress重写规则;最后在wordpress网站目录下新建htaccess文件即可。
wordpress去掉index.php的方法
主要有两个步骤:
1-1)wordpress设置固定链接
登录wordpress后台,
立即学习“PHP免费学习笔记(深入)”;
依次选择‘设置/固定链接’
在出现的页面中,
选择‘自定义结构’
然后根据你的情况,
设置好链接。
1-2)设置wordpress重写规则
这个需要根据你的web服务器来决定
1-2-1)wordpressapache静态链接重写规则
如果你是apache,
在wordpress网站目录下,
新建一个.htaccess文件
并写入下面的代码
<IfModulemod_rewrite.c>RewriteEngineOnRewriteBase/wordpress/RewriteRule^index\.php$-[L]RewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule./wordpress/index.php[L]</IfModule>