JTBC(CMS)

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

腾讯交流群: 2254994
技术支持群: 27032719
首页 » 在线论坛 » PHP版本 
帖子内容
1 楼
jetiben
管理员
积分 7076
注册 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
2 楼
new
银牌会员
积分 806
注册 2009-06-30
     
回复: PHP版本用.htaccess实现地址重写
谢谢更新!
遗憾的是——竟不知.htaccess为何物~
2010-01-31 19:48:14
3 楼
nilcay
注册会员
积分 532
注册 2008-10-27
     
回复: PHP版本用.htaccess实现地址重写
这个是什么
2010-02-02 21:23:21 华卓网 www.wardro.com (企业建站 webERP 网页软件开发)
4 楼
sanyeew
注册会员
积分 228
注册 2008-04-11
     
回复: PHP版本用.htaccess实现地址重写
看不懂呀,老大
2010-06-21 17:02:06 网道创想http://www.wandidea.com
5 楼
solomon
银牌会员
积分 710
注册 2010-02-01
     
回复: PHP版本用.htaccess实现地址重写
很好的东西,老大能不能具体说下步骤。
.htaccess都不知道十个什么哦。。。。

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




顺便问下asp有这东西没?怎么整?
2010-06-26 12:49:44 JTBC 加油!
6 楼
modisso
注册会员
积分 88
注册 2010-05-28
     
回复: PHP版本用.htaccess实现地址重写
老大这个.htaccess怎么用,能不能举个例子呀,新手不会,详细点
2010-06-29 22:47:59
7 楼
solomon
银牌会员
积分 710
注册 2010-02-01
     
回复: PHP版本用.htaccess实现地址重写
今天终于学会了,有需要的朋友联系我。
2011-02-25 23:48:53 JTBC 加油!
8 楼
wuzhiren3
注册会员
积分 118
注册 2010-03-28
     
回复: PHP版本用.htaccess实现地址重写
Nginx
不行,把上面的规则改成nginx可用的。
修改链接地址是?
把链接模式改成1?
2011-03-08 16:26:19 JTBC很好很强大
9 楼
iholyangel
金牌会员
积分 210
注册 2010-09-22
     
回复: PHP版本用.htaccess实现地址重写
希望老大可以详细点介绍呀...

2011-04-03 21:43:55 一等一网络 www.yidengyi.com
10 楼
iholyangel
金牌会员
积分 210
注册 2010-09-22
     
回复: PHP版本用.htaccess实现地址重写
“修改链接地址”是修改哪里的链接地址,如何修改呢?
2011-04-10 21:14:28 一等一网络 www.yidengyi.com