一、linux主机 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]
保存时保存类型选择“所有文件”,并输入文件名称:httpd.ini
将这个httpd.ini文件上传到WP程序所在的目录也就是与index.php在同一个目录内。
之后进入WP后台修改固定链接,比如:/%category%/%post_id%.html
刷新网站首页,打开文章链接看看链接地址中的index.php是不是消失了。
二、wordpress永久链接如何去掉index.php?
伪静态的问题
你可以到看看wordpress教程,什么问题都可以自己解决了
1、《wordpress新手基础入门视频》
2、《wordpress快速仿站视频》
3、《wordpress博客主题制作视频》
4、《wordpress单页主题制作视频》
5、《wordpress企业主题制作视频》
6、《wordpressCMS主题制作视频》
7、《DIV+CSS入门实战视频》
8、《wordpress插件制作视频》
9、《wordpress百科视频》
10、《wordpress模板主题实例》
11、《Wp安装设置使用视频》
12、wordpress建站优化班VIP课程
13、WordPress自动赚钱视频
14、7套高质量WordPress淘宝客商业模板
15、wordpress的seo快速优化系列视频
16、WordPress 安装+SEO优化+静态化+更换模版视频
教程地址:
三、wordpress永久链接如何去掉index.php
主机问题,要支持rewrite。
为了确认一下,你网站主目录下有没有可写的.htaccess文件。有的话加上
四、wordpress如何去掉index.php
rwrite重写设置伪静态即可。
WordPress伪静态 for nginx
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
五、WordPress链接中如何去掉index.php
具体操作步骤如下:1, 新建一个记事本文件, 写入以下代码, 并保存, 连同.txt格式重新命名为404.php;将这个404.php页面上传到网站根目录下。
<?php$qs =="" $_server['query_string'];$_server['request_uri']="substr($qs," strpos($qs,="" ':80′)+3);$_server['path_info']="$_SERVER['REQUEST_URI'];2," 在主机服务器的管理控制面板中,="" 设置404自定义错误指向404.php;3,="" 完成以上步骤后,在wordpress的后台="" –="" 设置(options)="" –="" 固定链接(permalinks)中重新设置你希望使用的永久链接形式就可以了.通过以上三步简单的设置,="" 你的windows主机就可以和linux主机一样,="">?php$qs>
六、如何去掉WordPress固定链接中的index.php
你是win主机的缘故。
[ISAPI_Rewrite]# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTP# Rules to ensure that normal content gets throughRewriteRule /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.phpRewriteRule ^/$ /index.php [L]RewriteRule /(.*) /index.php/$1 [L]新建文本,复制上面代码保存时保存类型选择“所有文件”,并输入文件名称:httpd.ini
将这个httpd.ini文件上传到WP程序所在的目录也就是与index.php在同一个目录内。
七、如何去掉WordPress固定链接中的index.php
新建文本文件夹。
复制下面代码 [ISAPI_Rewrite]# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTP# Rules to ensure that normal content gets throughRewriteRule /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.phpRewriteRule ^/$ /index.php [L]RewriteRule /(.*) /index.php/$1 [L]保存时保存类型选择“所有文件”,并输入文件名称:httpd.ini 将这个httpd.ini文件上传到WP程序所在的目录也就是与index.php在同一个目录内。 然后后台设置固定连接为默认,再重新为你其他的固定模式。
八、wordpress博客永久链接 去掉index.php
不是 指向404 是写htaccess文件
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
把上面的代码 写入htaccess 文件传到根目录就可以了
转载请注明出处51数据库 » wordpress去除index.ph