日期:2014-05-16  浏览次数:20966 次

配置apache的rewrite规则

1.解压rar文件:

wget http://www.rarlab.com/rar/rarlinux-x64-5.0.1.tar.gz
tar -zxvf rarlinux-x64-5.0.1.tar.gz
cd rar 
make 

见一下信息,安装成功

mkdir -p /usr/local/bin 
mkdir -p /usr/local/lib 
cp rar unrar /usr/local/bin 
cp rarfiles.lst /etc 
cp default.sfx /usr/local/lib

?常用指令

rar x vpsyou.rar                    //解压 vpsyou.rar 到当前目录 
rar vpsyou.rar ./vpsyou.com/        //将 vpsyou.com 目录打包为 vpsyou.rar 

?

2.增加rewrite模块

find / -name mod_rewrite.c
cd /usr/local/src/httpd-2.2.26/modules/mappers/
/usr/local/apache/bin/apxs -i -a -c ./mod_rewrite.c

?参见:http://blog.fesite.com/2009/05/21/linux-redhat-mod_rewrite/

?

3.开启rewrite

参见:http://www.liusuping.com/ubuntu-linux/Redhat-Apache-URLrewrite.html

? ? ? ? ? ?http://www.jb51.net/article/30120.htm

?

4.正则表达式

参见:http://deerchao.net/tutorials/regex/regex.html

?

5.http://free.yes81.net/yes81/view-11396.html

http://www.jb51.net/article/30647.htm

?

6.httpd:

http://www.liusuping.com/ubuntu-linux/linux-apache-httpdconf.html

?

?