apache(2.0.55) rewrite+proxy 至少需要三个module: rewrite_module, proxy_module, proxy_http_module 配置文件片断: LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/proxy_http.so rewriteengine on #注意 不是proxyrequest proxyrequests on #ProxyPass ^/(.*)$ http://host/$1 rewriterule ^/(.*)$ http://host/$1 [P,L] apache已安装后要新添加module可以用apache安装目录/bin下的apxs ,apxs -i -a –c foo_module.c 参考资料: apxs - APache扩展工具 http://www.uplinux.com/download/doc/apache/ApacheManual/programs/apxs.html Apache 重写规则的常见应用 (rewrite) http://fanqiang.chinaunix.net/a6/b1/20010905/0800001238.html

文章来源: http://spaces.msn.com/members/zzzhc/Blog/cns!1pPbKg7hHgS7AKKQm6CWG1ZQ!128.entry