Forum Moderators: phranque

Message Too Old, No Replies

Redirect for internal users ony

redirect

         

gisuser

8:13 pm on Dec 19, 2011 (gmt 0)

10+ Year Member



I have been using Apache 2.2 for about 3 years now as a Reverse Proxy. I know I have only scratched the surface on what it is capable of, but now I have a need for something more complex.

Basically I am looking for a way to re-direct internal users to an internal url, but still have external public users go through the external url.

Is this something that can be done with a Redirect?

This biggest issue is having it recognize that it is being accessed internally.

Any suggestions on where to start would be great! I am very new to all of modules that Apache has to offer.

Thanks,

Trent

g1smd

10:26 pm on Dec 19, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Mod_Rewrite can be used to generate redirects or it can be configured to rewrite (within same server) or proxy (to a different server) various requests.

lucy24

12:40 am on Dec 20, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



rewrite (within same server) or proxy (to a different server)

I think you've said that three times in the past week ;)

If you're on shared hosting-- as many people are when they start learning Apache-- does "different server" mean

--different userspace
or
--different domain within same userspace
or
--can't be done

?

Now, if you would occasionally sweep out your mailbox...

g1smd

8:06 am on Dec 20, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Proxy: different userspace on same server or different server box in same or different building.

With a proxy, server1 maks a HTTP request across the web to server2 to fetch the content.

With a rewrite, the target is an internal filepath on the same hard drive.

Having same ownership is what allows you to use a rewrite. Otherwise only a proxy could work.