httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Victor Tsang <vic...@outblaze.com>
Subject Re: [users@httpd] hi! ( rewrite )
Date Tue, 28 Jan 2003 02:05:56 GMT
REQUEST_URI does not contain host information.   for example. for the
URL http://somehost.com/somelink.htm REQUEST_URI refer to the string
"/somelink.htm"

For your redirect purpose, you should use the http header, "HTTP_HOST"
instead.

RewriteCond %{HTTP_HOST}  	^any_word
RewriteRule ^/(.*)		http://www.any_web.com/$1 [L,R]

You might want to check out the mod_rewrite guide, you will find a lot
of handy example there.

http://httpd.apache.org/docs/misc/rewriteguide.html

Good luck.

Tor.


Uxio Faria wrote:
> 
> somebody knows something about this?!!!!
> 
> El Sáb 25 Ene 2003 05:21, escribió:
> > I wanna configure apache with mod_rewite to redir a "http://any_word" to
> > "http://www.any_web.com" but with proxy rewrite.
> >
> > i tried this with:
> >
> > RewriteCond %{REQUEST_URI}   ^any_word$
> > RewriteRule ^/(.*)          http://www.any_web.com/$1 [R,P]
> >
> > But this only rewrite the first page, and the links of the page apears
> > broken.
> >
> > How can i make this?
> >
> > Sorry for my bad english.
> >
> > Best regards.
> >
> > ---------------------------------------------------------------------
> > 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
> 
> --
> ---------------------
>  Uxio Faria Giraldez
> ---------------------
>   SISTEMAS PRISACOM
>  ufaria@prisacom.com
>   TLF: 91 353 7770
> ---------------------
> 
> ---------------------------------------------------------------------
> 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