JTBC(CMS)

开源与免费的跨平台网站内容管理系统解决方案

首页 » 在线论坛 » PHP版本 
帖子内容
1 楼
jetiben
管理员
积分 4722
注册 2006-06-28
     
PHP版本用.htaccess实现地址重写
.htaccess 内容例子:

RewriteEngine on
RewriteRule ^aboutus/detail-(.[0-9]*).html$ aboutus/index.php?type=detail&id=$1
RewriteRule ^aboutus/detail-(.[0-9]*)-(.[0-9]*).html$ aboutus/index.php?type=detail&id=$1&page=$2
RewriteRule ^article/list-(.[0-9]*).html$ newsandevents/index.php?type=list&offset=$1
RewriteRule ^article/detail-(.[0-9]*).html$ newsandevents/index.php?type=detail&id=$1
RewriteRule ^article/detail-(.[0-9]*)-(.[0-9]*).html$ newsandevents/index.php?type=detail&id=$1&page=$2

对上面地址重写后, 需要修改链接地址, 也可以自定义添加1个链接模式就可以了
2010-01-31 15:41:25 http://www.jetiben.com/
2 楼
new
银牌会员
积分 530
注册 2009-06-30
     
回复: PHP版本用.htaccess实现地址重写
谢谢更新!
遗憾的是——竟不知.htaccess为何物~
2010-01-31 19:48:14 new start...
3 楼
nilcay
注册会员
积分 360
注册 2008-10-27
     
回复: PHP版本用.htaccess实现地址重写
这个是什么
2010-02-02 21:23:21 去我的世界看看:www.seeble.cn
回复帖子
发表人
主题
内容
验证码