> Apache2.2 中文手册 > 索引

URL重写

"The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail."

-- Brian Behlendorf
Apache Group

" Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo."

-- Brian Moore
bem@news.cmc.net

欢迎来到mod_rewrite,URL操作的瑞士军刀!

此模块提供了一个基于规则的(使用正则表达式分析器的)实时重写URL请求的引擎。 支持每个规则可以拥有不限数量的子规则以及附加条件规则的灵活而且强大的URL操作机制。 此URL操作可以取决于各种测试,比如服务器变量、环境变量、HTTP头、时间标记,甚至各种格式的用于匹配URL组成部分的查找数据库。

此模块可以操作URL的所有部分(包括路径信息部分),在服务器级(httpd.conf)和目录级(.htaccess)配置中都有效, 还可以生成最终的请求字符串。此重写操作的结果可以是内部子处理,也可以是外部请求的重定向,甚至还可以是内部代理处理。

但是,所有这些功能和灵活性带来一个问题,那就是复杂性,因此,不要指望一天之内就能看懂整个模块。

索引
下一篇: