ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Virtual Hosts, mod_rendezvous_apple, and Apache on Mac OS X
Subject:   another option - redirection instead of a dynamic link page
Date:   2003-05-22 18:52:17
From:   maarky
Instead of having a page that links to all of your virtual domains couldn't you redirect to them? I haven't tried this but I don't see why it wouldn't work.


Basically, follow the directions in this article to add each of your virtual domains (both of them - the NameVirtualHost and Listen). Then add this to the mod_rendezvous directive in your httpd.conf file:


RegisterResource "JoesFilters.joe" "/virtualRedirect.php?port=9000"
(add one of these for each of your domains replacing the port number for each)


Then make a file named virtualRedirect.php in the specified location that contains this php code:


<?php
header('Location: http://'.$_SERVER[SERVER_ADDR].':'.$_GET['port']);
?>


Remember that for the redirect to work you MUST place the opening php tag at the very beginning of the document. A single blank space or line break before the opening php tag will result in an error.


1 to 1 of 1
  1. another option - redirection instead of a dynamic link page
    2005-06-12 17:42:09  Wimy [View]

1 to 1 of 1