新聞中心
易企cms偽靜態(tài)設置教程
作者 / 無憂主機 時間 2015-05-29 23:02:24
偽靜態(tài)這個定義站長朋友都應該是非常熟悉的,那么問題來了,好多站長朋友在php空間設置易企cms的時候不會,居然說沒有成功,那么問題會出現(xiàn)在哪里呢,絕大部分的站長朋友認為在后臺設置,就可以正常的實現(xiàn)了,那么問題來了,打開鏈接報錯404錯誤,那么意思就是說偽靜態(tài)的url重定向失敗,那么這個原因的導致就是空間里面您沒有放入偽靜態(tài)規(guī)則導致的,所以說偽靜態(tài)規(guī)則是非常重要的。今天無憂主機小編就對于無憂主機php空間基礎上對易企cms做一下偽靜態(tài)設置的講解: 1、首先是登錄到我們的后臺,然后找到網站設置選線,然后再找到URL重寫,然后點擊url重定向選擇。也就是在開啟偽靜態(tài)的設置。 2、然后就是鏈接我們的ftp,找到我們站點的根目錄。創(chuàng)建一個.htaccess文件前面是一個點哈。然后放入以下規(guī)則:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^article\/(.+)\.html$ article.php?name=$1 [L] RewriteRule ^product\/(.+)\.html$ product.php?name=$1 [L] RewriteRule ^category\/([^/_]+)[/]?$ category.php?name=$1 [L] RewriteRule ^category\/([^/]+)_([0-9]+)[/]?$ category.php?name=$1&p=$2 [L] RewriteRule ^catalog\/([^/]+)[/]?$ catalog.php?type=$1 [L] RewriteRule ^comment.html$ comment.php [L] RewriteRule ^sitemap.xml$ sitemap.php [L] </IfModule>這個規(guī)則是對于apache的偽靜態(tài)設置。那么很多站長朋友就很奇怪了那么我的是其他的主機怎么辦呢:下面無憂主機小編就把對應的偽靜態(tài)設置簡單的公布一下。 1.iis 如果服務器軟件為iis,請確保服務端安裝過ISAPI_Rewrite組件. 然后聯(lián)系主機提供商,加入以下規(guī)則.
RewriteRule ^/article/(.+)\.html$ /article\.php\?name=$1 RewriteRule ^/product/(.+)\.html$ /product\.php\?name=$1 RewriteRule ^/category/([^/_]+)[/]?$ /category\.php\?name=$1 RewriteRule ^/category/([^/]+)_([0-9]+)[/]?$ /category\.php\?name=$1&p=$2 RewriteRule ^/catalog/([^/]+)[/]?$ /catalog\.php\?type=$1 RewriteRule ^/comment\.html$ /comment\.php RewriteRule ^/sitemap\.xml$ /sitemap\.php2.nginx 如果服務器軟件為nginx,請聯(lián)系主機提供商,加入以下規(guī)則
rewrite ^/article\/(.+)\.html$ /article.php?name=$1 last; rewrite ^/product\/(.+)\.html /product.php?name=$1 last; rewrite ^/category\/([^/]+)_([0-9]+)[/]? /category.php?name=$1&p=$2 last; rewrite ^/category\/([^/_]+)[/]? /category.php?name=$1 last; rewrite ^/catalog\/([^/]+)[/]? /catalog.php?type=$1 last; rewrite ^/comment.html$ /comment.php last; rewrite ^/sitemap.xml$ /sitemap.php last;幾乎這個程序目前為止,這個程序只給出了這幾種的偽靜態(tài)規(guī)則,希望能幫助者到站長朋友們! 無憂主機相關文章推薦閱讀: 易企CMS程序介紹
本文地址:http://m.love62.cn/yiqicms/19537.html
上一篇: Cmseasy(易通)安全密碼登陸設置
下一篇: Wordprss如何禁用Emoji表情腳本