You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert Morse <Ro...@brown.edu> on 2004/02/19 16:16:28 UTC

[users@httpd] different home pages

Hello,

I was asked to set up our web server so that people accessing the
home page from the inside will get one page, and people accessing
the home page from outside will get a different page. Has anbody
done this before? Or knows how to do this?

Thanks in advance.

-- 

Bob Morse
Senior Systems Programmer
CIS
Brown University
401 863 7426



---------------------------------------------------------------------
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


Re: [users@httpd] different home pages

Posted by Robert Morse <Ro...@brown.edu>.
Thanks for the help. I did look at virtual hosts, but it does not
solve my issue. At least not that I can see.

I still need the same servername and port for both internal and external.

 From ip range 111.222.*.* to http://cis.brown.edu get homepage1
from anywhere else  to http://cis.brown.edu get homepage2

I am thinking now that I should be able to do it with a Rewrite rule.




Darryl Cook wrote:

> sure....look at virtual hosts.
>
> darryl
>
> Robert Morse wrote:
>
>>
>> Hello,
>>
>> I was asked to set up our web server so that people accessing the
>> home page from the inside will get one page, and people accessing
>> the home page from outside will get a different page. Has anbody
>> done this before? Or knows how to do this?
>>
>> Thanks in advance.
>>
>
>
> ---------------------------------------------------------------------
> 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
>


-- 

Bob Morse
Senior Systems Programmer
CIS
Brown University
401 863 7426



---------------------------------------------------------------------
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


Re: [users@httpd] different home pages

Posted by Robert Morse <Ro...@brown.edu>.
Joshua Slive wrote:

>On Thu, 19 Feb 2004, Darryl Cook wrote:
>
>  
>
>>sure....look at virtual hosts.
>>    
>>
>
>  
>
>>Robert Morse wrote:
>>    
>>
>>>I was asked to set up our web server so that people accessing the
>>>home page from the inside will get one page, and people accessing
>>>the home page from outside will get a different page. Has anbody
>>>done this before? Or knows how to do this?
>>>      
>>>
>
>I don't think that's what he meant.  He wants users to see a different
>site based on THEIR address, not the server's address.
>
>One way to do this is with mod_rewrite, as in
>
>RewriteEngine On
>RewriteCond %{REMOTE_IP} some-regex
>RewriteRule .* /some/place
>
>Joshua.
>  
>
Thank you!!! That worked just as I needed it.
(except the env variable is REMOTE_ADDR)
Thanks again.

-- 

Bob Morse
Senior Systems Programmer
CIS
Brown University
401 863 7426



---------------------------------------------------------------------
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


Re: [users@httpd] different home pages

Posted by Darryl Cook <dl...@cs.appstate.edu>.
yes...my bad, I misunderstood the question.

Joshua Slive wrote:

>On Thu, 19 Feb 2004, Darryl Cook wrote:
>
>  
>
>>sure....look at virtual hosts.
>>    
>>
>
>  
>
>>Robert Morse wrote:
>>    
>>
>>>I was asked to set up our web server so that people accessing the
>>>home page from the inside will get one page, and people accessing
>>>the home page from outside will get a different page. Has anbody
>>>done this before? Or knows how to do this?
>>>      
>>>
>
>I don't think that's what he meant.  He wants users to see a different
>site based on THEIR address, not the server's address.
>
>One way to do this is with mod_rewrite, as in
>
>RewriteEngine On
>RewriteCond %{REMOTE_IP} some-regex
>RewriteRule .* /some/place
>
>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
>
>  
>

Re: [users@httpd] different home pages

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 19 Feb 2004, Darryl Cook wrote:

> sure....look at virtual hosts.

> Robert Morse wrote:
> > I was asked to set up our web server so that people accessing the
> > home page from the inside will get one page, and people accessing
> > the home page from outside will get a different page. Has anbody
> > done this before? Or knows how to do this?

I don't think that's what he meant.  He wants users to see a different
site based on THEIR address, not the server's address.

One way to do this is with mod_rewrite, as in

RewriteEngine On
RewriteCond %{REMOTE_IP} some-regex
RewriteRule .* /some/place

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


Re: [users@httpd] different home pages

Posted by Darryl Cook <dl...@cs.appstate.edu>.
sure....look at virtual hosts.

darryl

Robert Morse wrote:

>
> Hello,
>
> I was asked to set up our web server so that people accessing the
> home page from the inside will get one page, and people accessing
> the home page from outside will get a different page. Has anbody
> done this before? Or knows how to do this?
>
> Thanks in advance.
>


---------------------------------------------------------------------
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


RE: [users@httpd] different home pages

Posted by Chris <ch...@leftbrained.org>.
I assume you have different internal IP addresses for internal and external
use? Then you can base the virtual hsots of those internal IP addresses,
like this:

Example Internal IP: 192.168.0.4
Example External IP: 123.456.7.89

Listen 192.168.0.4:80
Listen 123.456.7.89:80
<VirtualHost 192.168.0.4:80>
...
</VirtualHost>
<VirtualHost 123.456.7.89:80>
...
</VirtualHost>



> -----Original Message-----
> From: Robert Morse [mailto:Robert_Morse@brown.edu]
> Hello,
>
> I was asked to set up our web server so that people accessing the
> home page from the inside will get one page, and people accessing
> the home page from outside will get a different page. Has anbody
> done this before? Or knows how to do this?
>
> Thanks in advance.
>
> --
>
> Bob Morse
> Senior Systems Programmer
> CIS
> Brown University
> 401 863 7426


---------------------------------------------------------------------
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