JTBC(CMS)

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

首页 » 在线论坛 » PHP版本 
帖子内容
1 楼
jetiben
管理员
积分 5554
注册 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
银牌会员
积分 764
注册 2009-06-30
     
回复: PHP版本用.htaccess实现地址重写
谢谢更新!
遗憾的是——竟不知.htaccess为何物~
2010-01-31 19:48:14 风云创想:http://www.eyesto.cn
3 楼
nilcay
注册会员
积分 376
注册 2008-10-27
     
回复: PHP版本用.htaccess实现地址重写
这个是什么
2010-02-02 21:23:21 去我的世界看看:www.seeble.cn
4 楼
sanyeew
注册会员
积分 130
注册 2008-04-11
     
回复: PHP版本用.htaccess实现地址重写
看不懂呀,老大
2010-06-21 17:02:06 三一动力电子商务网http://www.sanyee.com.cn
5 楼
solomon
银牌会员
积分 386
注册 2010-02-01
     
回复: PHP版本用.htaccess实现地址重写
很好的东西,老大能不能具体说下步骤。
.htaccess都不知道十个什么哦。。。。

强烈的顶,,,,,,,,,,,,,,,,,,,,,,,,,,,,




顺便问下asp有这东西没?怎么整?
2010-06-26 12:49:44 -
6 楼
modisso
注册会员
积分 88
注册 2010-05-28
     
回复: PHP版本用.htaccess实现地址重写
老大这个.htaccess怎么用,能不能举个例子呀,新手不会,详细点
2010-06-29 22:47:59