Apache http server
下载:
http://httpd.apache.org/download.cgi
下载apache_2.0.63-win32-x86-openssl-0.9.7m.msi后安装
安装完成之后,访问http://localhost/ 应该出现“it works”页面
要使apache支持rewrite,编辑conf/httpd.conf
取消”LoadModule rewrite_module modules/mod_rewrite.so”前的注释,(去掉最前面的”#”)
有的资料上说,应该再加一句” AddModule mod_rewrite.c”, 但是不加貌似也是可以的
最简单的rewrite
编辑conf/httpd.conf
找个空白处,添加以下内容
###################### rewrite ###############################
RewriteEngine on
RewriteRule ^/test.html$ ./test/test.html [R]
###################### rewrite ###############################
将http://localhost/test.html 重写到 http://localhost/test/test.html
网上资料
1. http://fanqiang.chinaunix.net/a6/b1/20010905/0800001238.html (类似概述)
2. http://www.diybl.com/course/3_program/java/javaxl/2008620/126945.html (windows下简单配置)
3. http://www.lupaworld.com/28274/viewspace-15734.html (入门,稍微具体的规则)
4. Apache http自带文档(rewrite 模块),网上有中文版下载 权威资料 http://man.chinaunix.net/newsoft/Apache2.2_chinese_manual/misc/rewriteguide.html
没有评论:
发表评论