httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Furesz Peter <the_co...@freemail.hu>
Subject Re: [users@httpd] url redirect
Date Tue, 18 Mar 2003 12:11:31 GMT
Yes, it is getting go right, but still not perfect.
When I use the rules like this:

RewriteCond %{HTTP_HOST} (.*)\.mydomain\.com$
RerwiteRule .* http://www.otherdomain.com/site.htm?user_site=%1

it is work perfectly (apache rewrite the incomming url-s user1.mydomain.com
to
www.otherdomain.com/?user_site=user1), but if I rewrite otherdomain to
mydomain apache
starting to make rewriting recursively. The server not response
I tryed to do the following:

 RewriteCond %(HTTP_HOST) (.*)\.mydomain\.com$
 RewriteCond %(HTTP_HOST) [^w]{3}\.bixerver\.com
 RewriteRule .* http://www.mydomain.com/?var=%1

But it is not working, (apache not rewrite any url)

----- Original Message -----
From: "Joshua Slive" <joshua@slive.ca>
To: <users@httpd.apache.org>
Cc: "Benjamin Krueger" <benjamin@seattlefenix.net>
Sent: Tuesday, March 18, 2003 3:30 AM
Subject: Re: [users@httpd] url redirect


>
> On Tue, 18 Mar 2003, Furesz Peter wrote:
>
> > Yes, thank you, but my problem is that
> > I never use mod_rewrite, I never use regular expression, my english
> > is poor and I can't understand thw whole mod_rewrite engine. :(
> > (sorry, i just get tired)
> > I have been reading this manual with two dictionary for 6-7 hours,
> > and I can't understand.
> > I try this but don't work:
> >
> > <Virtualhost a.b.c.d>
> >     RewriteEngine On
> >     RewriteLog /var/log/rewrite.log
> >     RewriteRule ^([^/]+).mydomain.com
> > http://www.mydomain.com/site.htm?user_site=$1
> >     VirtualDocumentRoot /foo/bar/%2+/%1.1/%1
> > </Virtualhost>
>
> And it appears you still haven't looked inside the RewriteLog like I
> suggested.  And you really have not defined what "don't work" means.  You
> need to give details on exactly what happens and exactly what you expect
> to happen.
>
> Finally, the immediate problem I see is that it needs to be
> ...?user_site=%1.
>
> Note %1 not $1.
>
> In general, you shouldn't expect mod_rewrite to be easy, and you should
> consider finding other solutions if you aren't comfortable with it.  It is
> no good getting this working if you don't understand it; you'll just run
> into problems down the road.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message