Apache下伪静态设置规则
将以下规则复制到.htaccess文件中并上传到网站根目录,如果您网站放在blog目录,请讲RewriteBase /改成相应RewriteBase /blog/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^index.html$ index.php [L]
RewriteRule ^index/([0-9]+)/$ index.php?pg=$1 [L]
RewriteRule ^blog/([0-9]+)\.html$ blog.php?id=$1 [L]
RewriteRule ^category/([0-9]+)\.html$ list.php?act=cat_list&id=$1 [L]
RewriteRule ^category/([0-9]+)/([0-9]+)/$ list.php?act=cat_list&id=$1&pg=$2 [L]
RewriteRule ^archives/([0-9]+)/([0-9]+)/([0-9]+)/$ list.php?act=archives_list&date=$1/$2&pg=$3 [L]
RewriteRule ^archive/([0-9]+)/([0-9]+)/$ list.php?act=archives_list&date=$1/$2 [L]
RewriteRule ^category/(.*) list.php?act=cat_list&keywords=$1 [QSA,L]
RewriteRule ^page/(.*)/$ page.php?id=$1 [QSA,L]
RewriteRule ^tag/(.*)/$ tag.php?tag=$1 [QSA,L]
RewriteRule ^blog/(.*) blog.php?keywords=$1 [QSA,L]
</IfModule>
Nginx下Simple-Log伪静态规则
if (!-e $request_filename)
{
rewrite "^/index\.html" /index.php last;
rewrite "^/index/([0-9]+)/$" /index.php?pg=$1 last;
rewrite "^/blog/([0-9]+)\.html$" /blog.php?id=$1 last;
rewrite "^/category/([0-9]+)/([0-9]+)/$" /list.php?act=cat_list&id=$1&pg=$2 last;
rewrite "^/category/([0-9]+)\.html$" /list.php?act=cat_list&id=$1 last;
rewrite "^/archives/([0-9]+)/([0-9]+)/([0-9]+)/$" /list.php?act=archives_list&date=$1/$2&pg=$3 last;
rewrite "^/archive/([0-9]+)/([0-9]+)/$" /list.php?act=archives_list&date=$1/$2 last;
rewrite "^/category/(.*)" /list.php?act=cat_list&keywords=$1 last;
rewrite "^/tag/(.*)/$" /tag.php?tag=$1 last;
rewrite "^/page/(.*)/$" /page.php?id=$1 last;
rewrite "^/blog/(.*)" /blog.php?keywords=$1 last;
}
Lighttpd下Simple-Log伪静态规则
url.rewrite-once = (
"^/index\.html$" => "index.php",
"^/index/([0-9]+)/$" => "/index.php?pg=$1",
"^/blog/([0-9]+)\.html$" => "/blog.php?id=$1",
"^/category/([0-9]+)\.html$" => "/list.php?act=cat_list&id=$1",
"^/category/([0-9]+)/([0-9]+)/$" => "/list.php?act=cat_list&id=$1&pg=$2",
"^/archives/([0-9]+)/([0-9]+)/([0-9]+)/$" => "/list.php?act=archives_list&date=$1/$2&pg=$3",
"^/archive/([0-9]+)/([0-9]+)/$" => "/list.php?act=archives_list&date=$1/$2",
"^/category/(.*)$" => "/list.php?act=cat_list&keywords=$1",
"^/page/(.*)/$" => "page.php?id=$1",
"^/tag/(.*)/$" => "tag.php?tag=$1",
"^/blog/(.*)$" => "blog.php?keywords=$1"
)
Sina SAE下伪静态规则
handle:
- rewrite: if(path ~ "index.html") goto "index.php"
- rewrite: if(path ~ "index/([0-9]+)/$") goto "index.php?pg=$1"
- rewrite: if(path ~ "blog/([0-9]+)\.html$") goto "blog.php?id=$1"
- rewrite: if(path ~ "category/([0-9]+)\.html$") goto "list.php?act=cat_list&id=$1"
- rewrite: if(path ~ "category/([0-9]+)/([0-9]+)/") goto "list.php?act=cat_list&id=$1&pg=$2"
- rewrite: if(path ~ "archives/([0-9]+)/([0-9]+)/([0-9]+)/$") goto "list.php?act=archives_list&date=$1/$2&pg=$3"
- rewrite: if(path ~ "archive/([0-9]+)/([0-9]+)/") goto "list.php?act=archives_list&date=$1/$2"
- rewrite: if(path ~ "category/(.*)") goto "list.php?act=cat_list&keywords=$1"
- rewrite: if(path ~ "page/(.*)/$") goto "page.php?id=$1"
- rewrite: if(path ~ "tag/(.*)/$") goto "tag.php?tag=$1"
- rewrite: if(!is_file()&&!is_dir()&&path ~ "/blog/(.*)") goto "blog.php?keywords=$1"
IIS下伪静态规则
请将以下内容复制到httpd.ini
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/index\.html$ $1/index\.php
RewriteRule ^(.*)/index/(.*)/$ $1/index.php\?pg=$2
RewriteRule ^(.*)/blog/([0-9]+)\.html$ $1/blog.php\?id=$2
RewriteRule ^(.*)/blog/([0-9]+)\.html(&page=([0-9]+))?$ $1/blog\.php\?tid=$2&page=$4
RewriteRule ^(.*)/blog/(.*)/$ $1/blog\.php\?tid=$1
RewriteRule ^(.*)/category/([0-9]+)\.html$ $1/list.php\?act=cat_list&id=$2
RewriteRule ^(.*)/category/([0-9]+)/([0-9]+)\.html$ $1/list.php\?act=cat_list&id=$2&pg=$2
RewriteRule ^(.*)/archives/([0-9]+)/([0-9]+)/$ $1/list.php\?act=archives_list&date=$2/$3&pg=$4
RewriteRule ^(.*)/archive/([0-9]+)/([0-9]+)/$ $1/list.php\?act=archives_list&date=$2/$3
RewriteRule ^(.*)/category/(.*)/$ $1/list.php\?act=cat_list&keywords=$2
RewriteRule ^(.*)/page/(.*)/$ $1/page.php\?page=$2
RewriteRule ^(.*)/tag/(.*)/$ $1/tag.php\?tag=$2
RewriteRule ^(.*)/blog/(.*)/$ $1/blog.php\?keywords=$2
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的博客系统 Simple-Log.zip
共637个文件
php:266个
png:90个
html:85个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 128 浏览量
2023-07-24
22:04:09
上传
评论
收藏 3.41MB ZIP 举报
温馨提示
基于PHP的博客系统 Simple-Log.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP的博客系统 Simple-Log.zip (637个子文件)
ueditor.css 44KB
ueditor.min.css 34KB
video-js.css 21KB
image.css 19KB
video.css 15KB
attachment.css 15KB
video-js.min.css 11KB
style.css 11KB
shCoreDefault.css 7KB
scrawl.css 4KB
codemirror.css 3KB
charts.css 3KB
background.css 2KB
style.css 2KB
emotion.css 2KB
dialogbase.css 2KB
music.css 2KB
login.css 2KB
edittable.css 1KB
template.css 1KB
webuploader.css 515B
help.css 395B
iframe.css 42B
vjs.eot 3KB
UEditorSnapscreen.exe 508KB
wface.gif 49KB
jxface2.gif 40KB
yface.gif 28KB
bface.gif 27KB
icons.gif 20KB
file-icons.gif 20KB
file-icons.gif 20KB
tface.gif 19KB
fface.gif 18KB
复件 headercontainerbg2.gif 9KB
headercontainerbg2.gif 9KB
cface.gif 8KB
s.gif 5KB
ok.gif 5KB
logo.gif 5KB
icons-all.gif 4KB
info_p.gif 4KB
list.gif 3KB
dh_bg1.gif 3KB
bg.gif 3KB
videologo.gif 2KB
cancelbutton.gif 1KB
center_bg.gif 1KB
button-bg.gif 1KB
lock.gif 1KB
alignicon.gif 1KB
word.gif 1019B
icon_doc.gif 1012B
icon_psd.gif 1009B
icon_rar.gif 1007B
icon_xls.gif 1005B
icon_mv.gif 1001B
icon_ppt.gif 1001B
icon_pdf.gif 996B
icon_mp3.gif 986B
icon_txt.gif 970B
icon_jpg.gif 950B
icon_exe.gif 949B
icon_chm.gif 923B
icon_subshot02_xianguo.gif 735B
loading.gif 734B
icon_subshot02_google.gif 597B
icon_subshot02_youdao.gif 586B
icon_subshot02_yahoo.gif 572B
icon_subshot02_zhuaxia.gif 568B
icon_subshot02_pageflakes.gif 470B
icons.gif 453B
icons.gif 453B
icons.gif 453B
success.gif 445B
success.gif 445B
success.gif 445B
cursor_v.gif 370B
cursor_h.gif 253B
anchor.gif 184B
quote.gif 176B
home.gif 176B
mail.gif 164B
highlighted.gif 111B
unhighlighted.gif 111B
tag_bg.gif 97B
bg.gif 84B
heng_ty.gif 74B
iconIndentArrow_local.gif 57B
pagebreak.gif 54B
spacer.gif 43B
0.gif 43B
add_blog.html 7KB
index.html 7KB
wordimage.html 6KB
map.html 6KB
emotion.html 6KB
image.html 6KB
setting.html 5KB
show.html 5KB
共 637 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
助力毕业
- 粉丝: 2173
- 资源: 5117
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功