httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] mod_rewrite problem
Date Sat, 04 Aug 2007 16:25:26 GMT
On 8/4/07, Yves Goergen <> wrote:
> Hello,
> I'm using mod_rewrite to correct some URLs on my web server, running
> Apache 2.0. But I have a strange problem with it. First, here's the
> rules I have set:
>     SetEnvIf Host .+
>     SetEnvIfNoCase Host ^beta\.unclassified\.de$ !desired_hostname
>     RewriteCond %{ENV:desired_hostname} !^$
>     RewriteRule ^(.*) http://%{ENV:desired_hostname}/$1 [L,R=301]

Once you know that you need to use mod_rewite, there is no point in
fooling around with mod_setenvif. It is simpler to do everything in
mod_rewrite. Or avoid it entirely.

Try one of the solutions here:

Also note that you should not do rewriting in .htaccess unless you
really have to. And if you still use mod_rewrite and can't get it to
work, then use the RewriteLog to see what is going on.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message