時(shí)間:2022-05-26 01:36:01 | 來源:網(wǎng)絡(luò)營(yíng)銷
時(shí)間:2022-05-26 01:36:01 來源:網(wǎng)絡(luò)營(yíng)銷
最近看到一些博友一直在談?wù)摼W(wǎng)站頁面的偽靜態(tài),也有博友質(zhì)疑道:偽靜態(tài)有什么作用?為什么要用偽靜態(tài)?如果要弄懂這些問題,那我們首先就要弄明白什么是偽靜態(tài)?其實(shí)偽靜態(tài)是相對(duì)真實(shí)靜態(tài)來講的。[ISAPI_Rewrite]將以上代碼復(fù)制粘貼到文本文檔后,我們?cè)賹⑽谋玖泶鏋閔ttpd.ini,這樣我們的偽靜態(tài)規(guī)則就弄好了,我們只需要將這個(gè)文件上傳到空間更目錄,如果在后臺(tái)→固定鏈接選擇自定義鏈接輸入/%category%/%post_id%.html或是/%post_id%.html點(diǎn)擊保存就可以了,這里面我們還需要一個(gè)插件的支持,那就是去除分類URL中間的category,我們只需要在后臺(tái)插件→安裝插件那搜索WP No Category Base,安裝啟用就可以了。這樣我們win系統(tǒng)下的wordpress程序偽靜態(tài)就完成了。
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# wordpress 偽靜態(tài)規(guī)則
# For tag(中文標(biāo)簽以及標(biāo)簽翻頁的規(guī)則)
RewriteRule /tag/(.*)/page/(/d+)$ /index/.php/?tag=$1&paged=$2
RewriteRule /tag/(.+)$ /index/.php/?tag=$1
# For category(中文分類以及分類翻頁的規(guī)則)
RewriteRule /category/(.*)/page/(/d+)$ /index/.php/?category_name=$1&paged=$2
RewriteRule /category/(.*) /index/.php/?category_name=$1
# For sitemapxml
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /sitemap.html /sitemap.html [L]
RewriteRule /sitemap_baidu.xml /sitemap_baidu.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]
# BEGIN WordPress以上代碼也是一樣,需要我們新建一個(gè)文本文檔,然后將代碼復(fù)制粘貼進(jìn)去,點(diǎn)擊另存為.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>
# END WordPress
關(guān)鍵詞:靜態(tài),設(shè)置,技巧
客戶&案例
營(yíng)銷資訊
關(guān)于我們
客戶&案例
營(yíng)銷資訊
關(guān)于我們
微信公眾號(hào)
版權(quán)所有? 億企邦 1997-2022 保留一切法律許可權(quán)利。