mod_rewrite依赖什么模块?

时间:2022-10-06 08:03:48

proxy? proxy_http? what else?

代理? proxy_http?还有什么?

When I include all of the available modules, rewrite works, but I'm having a hard time figuring out which ones are actually making the difference.

当我包含所有可用的模块时,重写有效,但我很难搞清楚哪些模块实际上有所不同。

ANSWER: vhost_alias was one. seems to work now.

答案:vhost_alias就是其中之一。似乎现在工作。

2 个解决方案

#1


mod_rewrite in itself does not have any direct dependencies. There are a few directives that can delegate work to other modules (like RewriteRule .... [P], which uses mod_proxy to execute the request) thus requiring additional modules.

mod_rewrite本身没有任何直接依赖关系。有一些指令可以将工作委托给其他模块(如RewriteRule .... [P],它使用mod_proxy来执行请求),因此需要额外的模块。

#2


To have mod_rewrite working, first, you have to turn it on. in httpd.conf uncomment this: LoadModule rewrite_module libexec/mod_rewrite.so and restart Apache.

要让mod_rewrite工作,首先,你必须打开它。在httpd.conf中取消注释:LoadModule rewrite_module libexec / mod_rewrite.so并重启Apache。

If you use .htaccess to manage the mod_rewrite, then you need to activate that as well. and set AllowOverride.

如果你使用.htaccess来管理mod_rewrite,那么你也需要激活它。并设置AllowOverride。

reference: http://www.usenet-forums.com/apache-web-server/10742-activate-mod_rewrite.html

and http://www.apachefriends.org/f/viewtopic.php?f=16&t=33314 and http://httpd.apache.org/docs/2.0/en/mod/core.html#allowoverride

和http://www.apachefriends.org/f/viewtopic.php?f=16&t=33314和http://httpd.apache.org/docs/2.0/en/mod/core.html#allowoverride

#1


mod_rewrite in itself does not have any direct dependencies. There are a few directives that can delegate work to other modules (like RewriteRule .... [P], which uses mod_proxy to execute the request) thus requiring additional modules.

mod_rewrite本身没有任何直接依赖关系。有一些指令可以将工作委托给其他模块(如RewriteRule .... [P],它使用mod_proxy来执行请求),因此需要额外的模块。

#2


To have mod_rewrite working, first, you have to turn it on. in httpd.conf uncomment this: LoadModule rewrite_module libexec/mod_rewrite.so and restart Apache.

要让mod_rewrite工作,首先,你必须打开它。在httpd.conf中取消注释:LoadModule rewrite_module libexec / mod_rewrite.so并重启Apache。

If you use .htaccess to manage the mod_rewrite, then you need to activate that as well. and set AllowOverride.

如果你使用.htaccess来管理mod_rewrite,那么你也需要激活它。并设置AllowOverride。

reference: http://www.usenet-forums.com/apache-web-server/10742-activate-mod_rewrite.html

and http://www.apachefriends.org/f/viewtopic.php?f=16&t=33314 and http://httpd.apache.org/docs/2.0/en/mod/core.html#allowoverride

和http://www.apachefriends.org/f/viewtopic.php?f=16&t=33314和http://httpd.apache.org/docs/2.0/en/mod/core.html#allowoverride