WellCMS 是一款具備億級負載、開源,、傾向移動端,、輕量級、具有超快反應能力的高負載CMS,,是大數據量,、高并發(fā)訪問網站最佳選擇的輕CMS。wellcms具有安全,、高效,、穩(wěn)定、速度超快,、負載超強的特點,。是大數據時代下誕生的CMS,低成本解決網站負載和性能問題,,專為大數據量站點設計的高性能,、高負載的CMS。前后臺均可在移動端操作,,自適應手機,、平板、PC,,也可以設置各端加載單獨模板,,并且URL保持不變,有著非常方便的插件機制。前臺部分頁面配備API,,可通過JSON返回AJAX請求的數據,,方便 APP 開發(fā)。
以下為wellcms程序 關于偽靜態(tài)設置教程及注意方法:
首先進入根目錄下的conf目錄
找到conf.php文件并下載
使用notepad++打開,,所有支持utf8的編輯器都可以,。
需要編輯 conf/conf.php
1. 編輯 'url_rewrite_on'=>1,
wellcms 支持 4 種格式偽靜態(tài):
0:?user-login.html
1:user-login.html
2:/user/login.html
3:/user/login
0 和1 格式支持二級目錄,需要修改 conf/conf.php 如下
'path' => './', 'cookie_path' => '',
2 和 3 格式不支持二級目錄,,需要修改 conf/conf.php 如下
'path' => '/', 'cookie_path' => '/',
保存conf.php,,然后上傳覆蓋原文件。
2. 清空 tmp 目錄里面的文件,;
3.設置偽靜態(tài)規(guī)則,,重啟服務,進入后臺清空緩存,。
Nginx:
打開 nginx 配置文件 /usr/local/nginx/conf/nginx.conf 找到對應的虛擬主機配置處,,追加加粗行:
url_rewrite_on 為 1 格式 user-login.html 偽靜態(tài)規(guī)則:
location / {
if (!-e $request_filename) {
rewrite ^((.*)/)?(.*).html$ $1/index.php last;
}
}
url_rewrite_on 為 2格式 /user/login.html 或 3 格式 /user/login/
目錄化偽靜態(tài) Nginx 偽靜態(tài)規(guī)則,其他環(huán)境請自行修改:
location / {
if (!-e $request_filename) {
rewrite ^((.*)/) /index.php last;
}
}
下面這個偽靜態(tài)同時支持htm和html后綴
location / {
rewrite ^((.*)/)?(.*).html$ $1/index.php last;
try_files $uri $uri/ /index.html;
}
然后重新啟動 nginx: service nginx restart
Apache:
vim /etc/httpd/conf/httpd.conf
<Directory d:/wellcms.com>
Options FollowSymlinks ExecCGI Indexes
AllowOverride all
Order deny,allow
Allow from all
Satisfy all
NameVirtualHost *:80
Apache .htaccess 網友分享偽靜態(tài) 2 和 3 規(guī)則,,自行測試修改
<IfModule mod_rewrite.c>
RewriteEngine On
Rewritebase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.+) index.php?rewrite=$1 [L]
</IfModule>
Apache .htaccess 偽靜態(tài) 1 規(guī)則
如果Appache 支持 .htaccess,,那么可以編輯 .htaccess 文件放置于根目錄下:
RewriteEngine on
# Apache 2.4
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*?)([^/]*)$ $1index.php?$2 [QSA,PT,L]
# Apache other
#RewriteRule ^(.*?)([^/]*)\.html(.*)$ $1/index.php?$2.html$3 [L]
Apache httpd.conf
如果將規(guī)則直接放入 httpd.conf 則需要在前面加 / ,看來 Apache 也反人類:
RewriteEngine on
RewriteRule ^(.*?)([^/]*)\.html(.*)$ $1/index.php?$2.html$3 [L]
SAE環(huán)境,,根目錄建立 config.yaml 文件:
appname: wellcms
version: 1
handle:
- rewrite: if ( !is_dir() && !is_file() && path ~ "admin/(.*.html)" ) goto "admin/index.php?%1"
- rewrite: if ( !is_dir() && !is_file() && path ~ "[^/?].html" ) goto "index.php?%1"
iis 7.5移步到這個頁面
http://www.wellcms.cn/read-12.html