Web Servers on Unix and Linux - Redirect from referer?

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > July 2005 > Redirect from referer?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Redirect from referer?
vincenzo.dellamea@gmail.com

2005-07-14, 5:51 pm

Dear all,
I woul like to have a redirect while maintaining the same original URI.
Is this possible using referer and mod_rewrite? Let me explain better:

I have a small site (http://www.site1.com), which I woul like to be
served by pages at http://www.site2.com/site1/. I do not have any
control on DNS or ISP-based redirection.
At present, I have put a Redirect / http://www.site2.com/site1/
directive on .htaccess. However, the browser then shows a
http://www.site2.com/site1 URI, wilst I would rather prefer that the
original www.site1.com URL remains.
Is there any possibility to have this using rewriting?

Thanks,
VDM

Tim

2005-07-17, 7:48 am

On 14 Jul 2005 07:37:08 -0700,
vincenzo.dellamea@gmail.com posted:

> I woul like to have a redirect while maintaining the same original URI.


And the point of that is?

You "redirect" to go to somewhere else. If the address doesn't change,
then you haven't been redirected somewhere.

(You can't stand four metres to your right, while still standing where you
were a moment ago.)

> Is this possible using referer and mod_rewrite? Let me explain better:
>
> I have a small site (http://www.site1.com), which I woul like to be
> served by pages at http://www.site2.com/site1/. I do not have any
> control on DNS or ISP-based redirection.


I think that you would need control over your DNS to do any redirections.
Or at the very least to have two servers that you can custom configure at
both hostnames, to attempt anything like this.

> At present, I have put a Redirect / http://www.site2.com/site1/
> directive on .htaccess. However, the browser then shows a
> http://www.site2.com/site1 URI, wilst I would rather prefer that the
> original www.site1.com URL remains.
> Is there any possibility to have this using rewriting?


Show the code that you actually used. None of us can accurately guess what
you've done.

The only way that <http://one.example.com/> can successfully work being
redirected to <http://two.example.com/>, or vice versa, is if both servers
have the files to serve in the locations you're using. The same applies
whether it's two different servers, or one server acting as two servers by
using virtual hosts.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Paul Rubin

2005-07-17, 7:48 am

vincenzo.dellamea@gmail.com writes:
> At present, I have put a Redirect / http://www.site2.com/site1/
> directive on .htaccess. However, the browser then shows a
> http://www.site2.com/site1 URI, wilst I would rather prefer that the
> original www.site1.com URL remains.
> Is there any possibility to have this using rewriting?


No not really. The two ways to do it are with proxying or with an
HTML frame to disguise the page's real origin. The frame approach is
annoying and I hate sites that do it, but it's common. Depending on
the application it may be better to use a chromeless pop-up or
something.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com