測試環(huán)境
寶塔 Nginx -Tengine2.2.3 的 PHP5.6 + MySQL5.6.44
為防止調(diào)試錯誤,建議使用測試環(huán)境運行的 php 與 mysql 版本
首先用 phpMyAdmin 導入數(shù)據(jù)庫文件 db/db.sql
如果導入不行,請直接復制數(shù)據(jù)庫內(nèi)容運行 sql 語句也可以
再修改 config.php 來進行數(shù)據(jù)庫配置
然后在服務器設置好偽靜態(tài)規(guī)則
訪問網(wǎng)站 OK
后臺是:你的域名 /admin/login.php 賬號:admin 密碼:qqqqqq
Nginx 偽靜態(tài)規(guī)則
rewrite ^/index.html$ /index.php; rewrite ^/about.html$ /about.php; rewrite ^/search.html$ /search.php; rewrite ^/ranking.html$ /ranking.php; rewrite ^/wz.html$ /wzall.php; rewrite ^/apply.html$ /apply.php; rewrite ^/404.html$ /404.php; rewrite ^/sort([1-9]+[0-9]*).html$ /sort.php?id=$1; rewrite ^/sort([a-zA-Z]+).html$ /sort.php?alias=$1; rewrite ^/site_([1-9]+[0-9]*).html$ /site.php?id=$1; rewrite ^/wz([1-9]+[0-9]*).html$ /wz.php?id=$1; rewrite ^/wzshow_([1-9]+[0-9]*).html$ /wzshow.php?id=$1;
Apache 偽靜態(tài)規(guī)則
RewriteEngine On rewritebase / RewriteRule ^index.html /index.php [L,NC] RewriteRule ^about.html about.php [L,NC] RewriteRule ^search.html search.php [L,NC] RewriteRule ^ranking.html ranking.php [L,NC] RewriteRule ^wz.html wzall.php [L,NC] RewriteRule ^apply.html apply.php [L,NC] RewriteRule ^404.html 404.php [L,NC] RewriteRule ^sort([0-9]+).html sort.php?id=$1 [L,NC] RewriteRule ^sort([a-zA-Z]+).html sort.php?alias=$1 [L,NC] RewriteRule ^site_([0-9]+).html site.php?id=$1 [L,NC] RewriteRule ^wz([0-9]+).html wz.php?id=$1 [L,NC] RewriteRule ^wzshow_([0-9]+).html wzshow.php?id=$1 [L,NC]
IIS 偽靜態(tài)規(guī)則(請查看壓縮包中的版本簡單說明)
下載地址:
? 版權聲明
文章版權歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載。
THE END