潮人地東莞seo博客小編下面跟大家分享關于seo博客推廣:wordpress如何路徑偽靜態處理等問題,希望seo專員在做seo優化的過程中有所幫助,內容僅供參考。
10473℃
一直以來很多同學學了路徑優化,總是糾結網站如何做偽靜態處理,今天我來分享wordpress如何路徑偽靜態處理;(本地網站為例)

seo博客相關推薦閱讀:seo技術:域名是怎樣意思?域名的含義有怎樣,域名有怎樣作用嗎
沒處理之前 基本路徑像這種:http://www.woniuseo.com/?p=905

?
處理方法:
第一種:設置-固定鏈接-自定義結構(后面加上:/%post_id%.html)

保存之后,我們再來看下:

?
這樣就成功了 ?是不是很簡單呢!
?
注意:當然,每種空間環境不一樣,那么不一定100%解決,所以需要配備環境規則,其他的類似;
下面是支持wordpress的偽靜態規則
?
IIS偽靜態規則
IIS 環境是 Windows 主機常用的服務器環境,新建一個 txt 文件,將下面的代碼添加到文件中:
12345678910111213141516171819202122
[ISAPI_Rewrite]# Defend your computer from some worm attacks#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]# 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 /tag/(.*) /index\.php\?tag=$1RewriteRule /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 no正規seo網絡推廣技術rmal wordpress content, via index.phpRewriteRule ^/$ /index.php [L]RewriteRule /(.*) /index.php/$1 [L]
保存,刪除記事本的名字,包括后綴名.txt一起刪掉,修改為(.htaccess)上傳根目錄就可以了。
Apache偽靜態規則
Apache是 Linux 主seo搜索推廣簡介機下常見的環境,現在一般的 Linux 虛擬主機都采用這種環境。新建一個 htaccess.txt 文件,添加下面的代碼:
12345678
RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]
然后上傳到 WordPress 站點的根目錄,重命名為 .htaccess 即可
Nginx偽靜態規則
Nginx環境一般是Linux 主機 VPS或服務器用戶用的比較多,這些用戶一般都會自己配置Nginx,或者有專門的人幫你配置,打開 nginx.conf 或者某個站點的配置環境,比如 wpdaxue.com.conf(不同人配置的不一樣),在? server?? { } 大括號里面添加下面的代碼:
1234567891011
location / {if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; }if (-f $re嘉善一站式seo推廣報價quest_filename/index.php){ rewrite (.*) $1/index.php; }if (!-f $request_filename){ rewrite (.*) /index.php; }}
保存,重啟 Nginx 即可。
站長偷懶,你可以點擊其他頁面…555
以上是潮人地東莞seo博客跟大家分享關于seo博客推廣:wordpress如何路徑偽靜態處理等問題,希望能對大家有所幫助,若有不足之處,請諒解,我們大家可以一起討論關于網站seo優化排名的技巧,一起學習,以上內容僅供參考。