中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

無插件純代碼方式去除wordpress鏈接中的index.php

2018-11-02    來源:學(xué)做網(wǎng)站論壇

容器云強(qiáng)勢(shì)上線!快速搭建集群,上萬Linux鏡像隨意使用

對(duì)于學(xué)建站新手,推薦剛開始使用wordpress程序?qū)W習(xí)做網(wǎng)站,由于wordpress是PHP編程語言,它與LINUX空間配合很好,但仍有很多做網(wǎng)站新手會(huì)購(gòu)買到windows屬性空間,就導(dǎo)致了安裝wordpress程序之后,偽靜態(tài)出現(xiàn)鏈接中含有index.php的情況。(相關(guān)知識(shí):網(wǎng)站偽靜態(tài)規(guī)則)

無插件純代碼方式去除wordpress鏈接中的index.php

去除鏈接中的index.php有二個(gè)方法:

  • 一個(gè)是使用WORDPRESS插件;
  • 另一種是使用純代碼修改。

下面講講如何使用無插件純代碼方式去除網(wǎng)站鏈接中的index.php。

  1. 首先桌面新建一個(gè)txt文本,然后復(fù)制以下代碼至txt文件中:
    
    
    [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]
  2. 然后保存文本文件為httpd.ini文件;再將httpd.ini文件上傳至自己做網(wǎng)站的空間根目錄。
  3. 刷新網(wǎng)站首頁(yè),就會(huì)看到鏈接中的index.php被去除了。

標(biāo)簽: linux 代碼 建站

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請(qǐng)聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請(qǐng)與原作者聯(lián)系。

上一篇:wordpress自定義欄目設(shè)置方法

下一篇:WordPress網(wǎng)站圖片自動(dòng)添加alt信息的兩種方法