广告投放

win主机搭建wordpress去掉链接中的index.php

目录

    win主机搭建wordpress去掉链接中的index.php
    wordpress

    从来未用过WIN主机,所以对这个链接中的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是不是消失了。

    原文地址:www.zz2zz.com

    声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

    给TA打赏
    共{{data.count}}人
    人已打赏
    广告位招租919838898
    0 条回复 A文章作者 M管理员
      暂无讨论,说说你的看法吧
    个人中心
    购物车
    优惠劵
    今日签到
    有新私信 私信列表
    搜索