問:我的網(wǎng)站yixueyuan.cc靜態(tài)化規(guī)則如下:請問我該怎么實(shí)現(xiàn)靜態(tài)化?
Apache Web Server(獨(dú)立主機(jī)用戶)< mod_rewrite.c>
On
%{QUERY_STRING} ^(.*)$
^(.*)/topic-(. )\\.html$ $1/portal.php?mod=topic&topic=$2&%1
%{QUERY_STRING} ^(.*)$
^(.*)/article-([0-9] )-([0-9] )\\.html$ $1/portal.php?mod=view&aid=$2&page=$3&%1
%{QUERY_STRING} ^(.*)$
^(.*)/forum-(\\w )-([0-9] )\\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1
%{QUERY_STRING} ^(.*)$
^(.*)/thread-([0-9] )-([0-9] )-([0-9] )\\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\\%3D$4&page=$3&%1
%{QUERY_STRING} ^(.*)$
^(.*)/group-([0-9] )-([0-9] )\\.html$ $1/forum.php?mod=group&fid=$2&page=$3&%1
%{QUERY_STRING} ^(.*)$
^(.*)/space-()-(. )\\.html$ $1/home.php?mod=space&$2=$3&%1
%{QUERY_STRING} ^(.*)$
^(.*)/blog-([0-9] )-([0-9] )\\.html$ $1/home.php?mod=space&uid=demo$2&do=blog&id=$3&%1
%{QUERY_STRING} ^(.*)$
^(.*)/archiver/(fid|tid)-([0-9] )\\.html$ $1/archiver/index.php?action=$2&value=$3&%1
%{QUERY_STRING} ^(.*)$
^(.*)/([a-z] [a-z0-9_]*)-([a-z0-9_\\-] )\\.html$ $1/plugin.php?id=$2:$3&%1
</IfModule> Web Server(虛擬主機(jī)用戶)# 將 模式打開
On
# 如 www.discuz.net/bbs/,對應(yīng)的就是 /bbs/,如果程序放在根目錄中,使用 /
/
# 系統(tǒng)規(guī)則請勿修改
%{QUERY_STRING} ^(.*)$
^topic-(. )\\.html$ portal.php?mod=topic&topic=$1&%1
%{QUERY_STRING} ^(.*)$
^article-([0-9] )-([0-9] )\\.html$ portal.php?mod=view&aid=$1&page=$2&%1
%{QUERY_STRING} ^(.*)$
^forum-(\\w )-([0-9] )\\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
%{QUERY_STRING} ^(.*)$
^thread-([0-9] )-([0-9] )-([0-9] )\\.html$ forum.php?mod=viewthread&tid=$1&extra=page\\%3D$3&page=$2&%1
%{QUERY_STRING} ^(.*)$
^group-([0-9] )-([0-9] )\\.html$ forum.php?mod=group&fid=$1&page=$2&%1
%{QUERY_STRING} ^(.*)$
^space-()-(. )\\.html$ home.php?mod=space&$1=$2&%1
%{QUERY_STRING} ^(.*)$
^blog-([0-9] )-([0-9] )\\.html$ home.php?mod=space&uid=demo$1&do=blog&id=$2&%1
%{QUERY_STRING} ^(.*)$
^archiver/(fid|tid)-([0-9] )\\.html$ archiver/index.php?action=$1&value=$2&%1
%{QUERY_STRING} ^(.*)$
^([a-z] [a-z0-9_]*)-([a-z0-9_\\-] )\\.html$ plugin.php?id=$1:$2&%1Nginx Web ^([^\\.]*)/topic-(. )\\.html$ $1/portal.php?mod=topic&topic=$2 last;
^([^\\.]*)/article-([0-9] )-([0-9] )\\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
^([^\\.]*)/forum-(\\w )-([0-9] )\\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
^([^\\.]*)/thread-([0-9] )-([0-9] )-([0-9] )\\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
^([^\\.]*)/group-([0-9] )-([0-9] )\\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
^([^\\.]*)/space-()-(. )\\.html$ $1/home.php?mod=space&$2=$3 last;
^([^\\.]*)/blog-([0-9] )-([0-9] )\\.html$ $1/home.php?mod=space&uid=demo$2&do=blog&id=$3 last;
^([^\\.]*)/archiver/(fid|tid)-([0-9] )\\.html$ $1/archiver/index.php?action=$2&value=$3 last;
^([^\\.]*)/([a-z] [a-z0-9_]*)-([a-z0-9_\\-] )\\.html$ $1/plugin.php?id=$2:$3 last;
if (!-e $request_filename) {
404;
}IIS Web Server(獨(dú)立主機(jī)用戶)[ISAPI_Rewrite]
# 3600 = 1 hour
3600
32
# httpd.ini and httpd.parse.errors
# from HTTP
^(.*)/topic-(. )\\.html(\\?(.*))*$ $1/portal\\.php\\?mod=topic&topic=$2&$4
^(.*)/article-([0-9] )-([0-9] )\\.html(\\?(.*))*$ $1/portal\\.php\\?mod=view&aid=$2&page=$3&$5
^(.*)/forum-(\\w )-([0-9] )\\.html(\\?(.*))*$ $1/forum\\.php\\?mod=forumdisplay&fid=$2&page=$3&$5
^(.*)/thread-([0-9] )-([0-9] )-([0-9] )\\.html(\\?(.*))*$ $1/forum\\.php\\?mod=viewthread&tid=$2&extra=page\\%3D$4&page=$3&$6
^(.*)/group-([0-9] )-([0-9] )\\.html(\\?(.*))*$ $1/forum\\.php\\?mod=group&fid=$2&page=$3&$5
^(.*)/space-()-(. )\\.html(\\?(.*))*$ $1/home\\.php\\?mod=space&$2=$3&$5
^(.*)/blog-([0-9] )-([0-9] )\\.html(\\?(.*))*$ $1/home\\.php\\?mod=space&uid=demo$2&do=blog&id=$3&$5
^(.*)/archiver/(fid|tid)-([0-9] )\\.html(\\?(.*))*$ $1/archiver/index\\.php\\?action=$2&value=$3&$5
^(.*)/([a-z] [a-z0-9_]*)-([a-z0-9_\\-] )\\.html(\\?(.*))*$ $1/plugin\\.php\\?id=$2:$3&$5IIS7 Web Server(獨(dú)立主機(jī)用戶)<>
<>
<rule name="portal_topic">
< url="^(.*/)*topic-(. ).html\\?*(.*)$" />
< type="" url="{R:1}/portal.php\\?mod=topic&topic={R:2}&{R:3}" />
</rule>
<rule name="portal_article">
< url="^(.*/)*article-([0-9] )-([0-9] ).html\\?*(.*)$" />
< type="" url="{R:1}/portal.php\\?mod=view&aid={R:2}&page={R:3}&{R:4}" />
</rule>
<rule name="forum_forumdisplay">
< url="^(.*/)*forum-(\\w )-([0-9] ).html\\?*(.*)$" />
< type="" url="{R:1}/forum.php\\?mod=forumdisplay&fid={R:2}&page={R:3}&{R:4}" />
</rule>
<rule name="forum_viewthread">
< url="^(.*/)*thread-([0-9] )-([0-9] )-([0-9] ).html\\?*(.*)$" />
< type="" url="{R:1}/forum.php\\?mod=viewthread&tid={R:2}&extra=page%3D{R:4}&page={R:3}&{R:5}" />
</rule>
<rule name="group_group">
< url="^(.*/)*group-([0-9] )-([0-9] ).html\\?*(.*)$" />
< type="" url="{R:1}/forum.php\\?mod=group&fid={R:2}&page={R:3}&{R:4}" />
</rule>
<rule name="home_space">
< url="^(.*/)*space-()-(. ).html\\?*(.*)$" />
< type="" url="{R:1}/home.php\\?mod=space&{R:2}={R:3}&{R:4}" />
</rule>
<rule name="home_blog">
< url="^(.*/)*blog-([0-9] )-([0-9] ).html\\?*(.*)$" />
< type="" url="{R:1}/home.php\\?mod=space&uid=demo{R:2}&do=blog&id={R:3}&{R:4}" />
</rule>
<rule name="forum_archiver">
< url="^(.*/)*archiver/(fid|tid)-([0-9] ).html\\?*(.*)$" />
< type="" url="{R:1}/archiver/index.php\\?action={R:2}&value={R:3}&{R:4}" />
</rule>
<rule name="">
< url="^(.*/)*([a-z] [a-z0-9_]*)-([a-z0-9_\\-] ).html\\?*(.*)$" />
< type="" url="{R:1}/plugin.php\\?id={R:2}:{R:3}&{R:4}" />
</rule>
</rules>
</rewrite> Web server=demo(
"(.*)/topic-(. )\\.html\\?*(.*)$" => "$1/portal.php?mod=topic&topic=$2&$3",
"(.*)/article-([0-9] )-([0-9] )\\.html\\?*(.*)$" => "$1/portal.php?mod=view&aid=$2&page=$3&$4",
"(.*)/forum-(\\w )-([0-9] )\\.html\\?*(.*)$" => "$1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4",
"(.*)/thread-([0-9] )-([0-9] )-([0-9] )\\.html\\?*(.*)$" => "$1/forum.php?mod=viewthread&tid=$2&extra=page\\%3D$4&page=$3&$5",
"(.*)/group-([0-9] )-([0-9] )\\.html\\?*(.*)$" => "$1/forum.php?mod=group&fid=$2&page=$3&$4",
"(.*)/space-()-(. )\\.html\\?*(.*)$" => "$1/home.php?mod=space&$2=$3&$4",
"(.*)/blog-([0-9] )-([0-9] )\\.html\\?*(.*)$" => "$1/home.php?mod=space&uid=demo$2&do=blog&id=$3&$4",
"(.*)/archiver/(fid|tid)-([0-9] )\\.html\\?*(.*)$" => "$1/archiver/index.php?action=$2&value=$3&$4",
"(.*)/([a-z] [a-z0-9_]*)-([a-z0-9_\\-] )\\.html\\?*(.*)$" => "$1/plugin.php?id=$2:$3&$4",
)Caddy Web Server@portal_topic path_regexp portal_topic ^(.*)/topic-(. )\\.html$
@portal_topic {re.portal_topic.1}/portal.php?mod=topic&topic={re.portal_topic.2}&{query}
@portal_article path_regexp portal_article ^(.*)/article-([0-9] )-([0-9] )\\.html$
@portal_article {re.portal_article.1}/portal.php?mod=view&aid={re.portal_article.2}&page={re.portal_article.3}&{query}
@forum_forumdisplay path_regexp forum_forumdisplay ^(.*)/forum-(\\w )-([0-9] )\\.html$
@forum_forumdisplay {re.forum_forumdisplay.1}/forum.php?mod=forumdisplay&fid={re.forum_forumdisplay.2}&page={re.forum_forumdisplay.3}&{query}
@forum_viewthread path_regexp forum_viewthread ^(.*)/thread-([0-9] )-([0-9] )-([0-9] )\\.html$
@forum_viewthread {re.forum_viewthread.1}/forum.php?mod=viewthread&tid={re.forum_viewthread.2}&extra=page\\%3D{re.forum_viewthread.4}&page={re.forum_viewthread.3}&{query}
@group_group path_regexp group_group ^(.*)/group-([0-9] )-([0-9] )\\.html$
@group_group {re.group_group.1}/forum.php?mod=group&fid={re.group_group.2}&page={re.group_group.3}&{query}
@home_space path_regexp home_space ^(.*)/space-()-(. )\\.html$
@home_space {re.home_space.1}/home.php?mod=space&{re.home_space.2}={re.home_space.3}&{query}
@home_blog path_regexp home_blog ^(.*)/blog-([0-9] )-([0-9] )\\.html$
@home_blog {re.home_blog.1}/home.php?mod=space&uid=demo{re.home_blog.2}&do=blog&id={re.home_blog.3}&{query}
@forum_archiver path_regexp forum_archiver ^(.*)/archiver/(fid|tid)-([0-9] )\\.html$
@forum_archiver {re.forum_archiver.1}/archiver/index.php?action={re.forum_archiver.2}&value={re.forum_archiver.3}&{query}
@plugin path_regexp ^(.*)/([a-z] [a-z0-9_]*)-([a-z0-9_\\-] )\\.html$
@plugin {re.plugin.1}/plugin.php?id={re.plugin.2}:{re.plugin.3}&{query}
,如何實(shí)現(xiàn)靜態(tài)化?
答:您好,
查看您程序是的,已經(jīng)設(shè)置好偽靜態(tài)了,請您測試,非常感謝您對我司的支持!
三五互聯(lián)(35.com)是經(jīng)工信部、ICANN、CNNIC認(rèn)證審批,持有ISP、云牌照、IDC、CDN、頂級域名注冊商等全業(yè)務(wù)資質(zhì)的正規(guī)老牌服務(wù)商,自成立至今20余年專注于域名注冊、虛擬主機(jī)、云服務(wù)器、企業(yè)郵箱、企業(yè)建站等互聯(lián)網(wǎng)基礎(chǔ)服務(wù)!
截止目前,已經(jīng)為超過2000萬個(gè)域名提供了注冊、解析等服務(wù),是中國五星級域名注冊注冊商!已為超過50萬個(gè)網(wǎng)站提供了高速穩(wěn)定的云托管服務(wù),獲評中國最受用戶喜歡云主機(jī)服務(wù)商。
三五互聯(lián)提供全方位專業(yè)售后支撐,域名注冊特價(jià)1元起,高速穩(wěn)定云主機(jī)45元起,更多詳情請瀏覽三五互聯(lián)官網(wǎng):http://www.shinetop.cn/