域名跳转

apache伪静态.htaccess的写法和mod_rewrite规则修正符

星期日, 一月 8th, 2012 | disucz, php | 没有评论

apache 配置:
1.加载此模块(去掉前面的#即可):LoadModule rewrite_module modules/mod_rewrite.so
2.启用规则文件加载配置:
<Directory />
Options FollowSymLinks
#AllowOverride None
AllowOverride FileInfo
Order deny,allow
Deny from all
</Directory>
3.新建.htaccess 文件 配置如下文件
RewriteEngine on
RewriteRule list-(.*)-(.*)\.html$ list.php?id=$1&sa=$2 [L]

1、mod_rewrite 简介和配置
Rewirte主要的功能就是实现URL的跳转和隐藏真实地址,基于Perl语言的正则表达式规范。平时帮助我们实现拟静态,拟目录,域名跳转,防止盗链等

2、mod_rewrite 规则的使用
› Continue reading

Tags: , , , , ,

Search

文章分类

Links

Meta