rewriterule help?

rewriterule help?

shimi linux-il at shimi.net
Fri Apr 22 13:04:58 IDT 2011


On Fri, Apr 22, 2011 at 12:57 PM, Hetz Ben Hamo <hetzbh at gmail.com> wrote:

>  Let's continue then... since this domain (VirtualHost) won't be serving
>> any OTHER traffic, there's no point at conditioning the rewrites (and
>> putting them into our debug process). RewriteCond can be removed.
>>
>> You've also placed a RewriteOptions Inherit. Which means the rewrite
>> engine inherits some configuration from the global configuration - which is
>> unknown to us. Unless you have a very good reason - please remove that too.
>>
>> Both conditions were left from another configuration which was global
> indeed.
>

Hmm no, point was that "RewriteOptions Inherit" _adds_ complexity to our
issue, where it adds (maybe) other options we might not be interested at. So
unless there's a very good reason (and I don't think there is, in this
scenario...) - it should be removed.


>
>> Finally, if all else fails; Why do you need RewriteRule anyways? :)
>>
>> What's wrong with:
>>
>> Redirect permanent / http://vps.net.bz/
>>
>> First, it doesn't move the parameters. if someone comes to
> blog.hetz.biz/?p=300 - it should go to vps.net.bz/?p=300
>
>
That's not what I understand from the documentation:
http://httpd.apache.org/docs/current/mod/mod_alias.html#redirect - but again
I may be missing something.


> Second, this requires a new virtualhost (for vps.net.bz) - am I right?
>

Which you already have at the moment, no? As there's no ServerAlias in that
VirtualHost you pasted, I understood vps.net.bz is on a different vhost.

Not that I understand what's wrong with a one-line VHost for the old
hostname. From some reason I take this type of configuration cleaner and
easier to debug later (and could also very be more efficient
performance-wise. or not. :))

Anyways that was suggestion if all else has failed. My experience is that
it's easier to solve the issue by braking it up to as many probable parts as
possible. Leaving just the RewriteRule/Redirect will tell us if the problem
was with the RewriteCond / Inherit. If it works, you can add more layers
later...

-- Shimi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20110422/c7b01b91/attachment.html>


More information about the Linux-il mailing list