Redirects based on remote hostname?

Redirects based on remote hostname?

Post by Roy Smi » Thu, 12 Mar 1998 04:00:00

I'm running Apache 1.2 on Digital Unix.

I want to be able to have 2 versions of a document, one for "intranet"
viewing, the other for external consumption.  I know how to restrict
access using the .htaccess mechanism, but that's not quite what I want.  I
don't want outside people to get an "access denied" message, just
(silently) get a different version of the page.  Is there any way to do


New York University School of Medicine


1. Want NCSA HTTPd to redirect based on hostname..

I've got a web server named running NCSA HTTPd. The root directory of the
server is /usr/local/etc/httpd/htdocs.

There are several DNS names that all point to this same machine, i.e., you
can access the server with http://servername/ or http://serveralias/. What
I'd like to do is have http://serveralias/ actually drop users into the
directory at /usr/local/etc/httpd/htdocs/serveralias/.

Would I use the <VirtualHost> directive to accomplish this? If so, will
links back to the root directory take people to the
/usr/local/etc/httpd/htdocs/ directory (what I want), or will it only take
them to the /usr/local/etc/httpd/htdocs/serveralias/ directory?

Thanks for any tips,


Jase P Wells, MTS (the Web & Scopus guy)

555 North Mathilda Avenue                 Phone: (408) 523-8706
Sunnyvale, California  94086              Fax:   (408) 523-4601
To avoid mass junk-mail my address is munged in the Reply-To header.


3. Internal port redirecting based on hostname

4. Termcap for Wyse60 / Unify 4GL

5. redirecting to different hostname and dropping query string

6. A sandbox for safely executing any binaries.

7. Forbid or redirect depending on hostname

8. HELP: audio files?!?!?!

9. hostname redirect

10. Better way to do Apache hostname redirects than this?

11. howto? hostname.domain redirect to http://someplace.blabla

12. how to redirect on hostname?

13. redirect hostname alias, netscape?