View previous topic :: View next topic |
Author |
Message |
skunk l33t
Joined: 28 May 2003 Posts: 646 Location: granada, spain
|
Posted: Fri Nov 26, 2004 3:00 am Post subject: weird problem with mod_rewrite |
|
|
hi all!
i'm trying to redirect requests like http://webmail.domain.com to http://webmail.domain.com/cgi-bin/openwebmail/openwebmail.pl adding the following to /etc/apache2/conf/apache2.conf:
Code: | <IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^webmail\.(.+)/?$ http://webmail.$1/cgi-bin/openwebmail/openwebmail.pl
</IfModule> |
mod_rewrite is loaded (apache 2.0.52) but it doesn't work at all... even not with trivial rewrite rules...
nothing useful in apache's error log.
thank you in advance |
|
Back to top |
|
|
wmgoree Apprentice
Joined: 08 Aug 2003 Posts: 246 Location: Alexandria, VA
|
Posted: Fri Nov 26, 2004 8:37 am Post subject: Re: weird problem with mod_rewrite |
|
|
Hmm.... in general, tell the regex engine everything you know:
RewriteRule ^webmail.domain.com(.*)?$ http://webmail.domain.com/cgi-bin/openwebmail/openwebmail.pl
Unless you want webmail.domain.com/foo to turn into webmail.domain.com/foo/cgi-bin/openwebmail/openwebmail.pl
I can't tell which one you're trying to do. _________________ vi? *snicker* it doesn't even include a mail reader... |
|
Back to top |
|
|
fleed l33t
Joined: 28 Aug 2002 Posts: 756 Location: London
|
Posted: Fri Nov 26, 2004 9:05 am Post subject: |
|
|
Turn on the rewrite logs as well so you can see exactly what it's doing. |
|
Back to top |
|
|
skunk l33t
Joined: 28 May 2003 Posts: 646 Location: granada, spain
|
Posted: Fri Nov 26, 2004 10:48 am Post subject: Re: weird problem with mod_rewrite |
|
|
wmgoree wrote: | Hmm.... in general, tell the regex engine everything you know:
RewriteRule ^webmail.domain.com(.*)?$ http://webmail.domain.com/cgi-bin/openwebmail/openwebmail.pl
Unless you want webmail.domain.com/foo to turn into webmail.domain.com/foo/cgi-bin/openwebmail/openwebmail.pl
I can't tell which one you're trying to do. |
it should work for every virtual domain so i can't hardcode the domain itself...
and no, webmail.domain.com/foo doesn't need to be redirected, just webmail.domain.com/
fleed wrote: | Turn on the rewrite logs as well so you can see exactly what it's doing. |
already tried with log level 9, but the log keeps empty |
|
Back to top |
|
|
fleed l33t
Joined: 28 Aug 2002 Posts: 756 Location: London
|
Posted: Fri Nov 26, 2004 11:45 am Post subject: |
|
|
Maybe there's something that keeps apache from even getting to your rewrite rules? What else do you have on your config? |
|
Back to top |
|
|
skunk l33t
Joined: 28 May 2003 Posts: 646 Location: granada, spain
|
Posted: Fri Nov 26, 2004 1:13 pm Post subject: |
|
|
fleed wrote: | Maybe there's something that keeps apache from even getting to your rewrite rules? What else do you have on your config? |
configs are from default installation, the only thing i've changed is uncommenting
Code: | #Include conf/vhosts/dynamic-vhosts.conf |
i've tried to apply the rewrite rule to others gentoo servers, but doesn't work neither... |
|
Back to top |
|
|
Loki|muh n00b
Joined: 30 Jan 2003 Posts: 54
|
Posted: Tue Dec 14, 2004 3:55 am Post subject: |
|
|
I have the same Problem
anything new? |
|
Back to top |
|
|
Loki|muh n00b
Joined: 30 Jan 2003 Posts: 54
|
Posted: Tue Dec 14, 2004 4:47 am Post subject: |
|
|
succeeded finally with RewriteLog and RewriteLogLevel 9
first I got this working:
RewriteEngine on
RewriteRule ^index.htm http://myserver/foobar
HTH
|
|
Back to top |
|
|
|