win主機使用php.ini實現(xiàn)wordpress偽靜態(tài)
來源:易賢網(wǎng) 閱讀:1160 次 日期:2014-09-02 15:09:04
溫馨提示:易賢網(wǎng)小編為您整理了“win主機使用php.ini實現(xiàn)wordpress偽靜態(tài)”,方便廣大網(wǎng)友查閱!

使用以下方法對win空間下的wordpress設置偽靜態(tài)前,請先詢問主機商是否支持偽靜態(tài)(IIS Rewrite 組件),這個是IIS6.0下最新的wordpress偽靜態(tài)規(guī)則。

win主機wordpress偽靜態(tài)規(guī)則:(以下涉及的代碼采自互聯(lián)網(wǎng))

1.創(chuàng)建一個php.ini文件(創(chuàng)建一個txt文件,然后得命名為php,更改.txt的后綴為.ini),然后添加下面的代碼:

[ISAPI_Rewrite]

# Defend your computer from some worm attacks

#RewriteRule .*(?:global.asa|default.ida|root.exe|..).* . [F,I,O]

# 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 /tag/(.*) /index.php?tag=$1

RewriteRule /software-files/(.*) /software-files/$1 [L]

RewriteRule /images/(.*) /images/$1 [L]

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.保存后,把php.ini文件上傳到網(wǎng)站根目錄,然后登陸wordpress博客后臺,在設置——固定鏈接中的自定義結構設置url形式即可。

提醒:要想使用wordpress程序建站的站長,最好還是選擇linux+apache結構搭建的主機或用來搭配服務器環(huán)境,因為可以省下不少麻煩。

更多信息請查看IT技術專欄

更多信息請查看CMS教程
易賢網(wǎng)手機網(wǎng)站地址:win主機使用php.ini實現(xiàn)wordpress偽靜態(tài)
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復僅供參考,敬請考生以權威部門公布的正式信息和咨詢?yōu)闇剩?/div>
相關閱讀CMS教程

2026國考·省考課程試聽報名

  • 報班類型
  • 姓名
  • 手機號
  • 驗證碼
關于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
咨詢QQ:1093837350(9:00—18:00)版權所有:易賢網(wǎng)