TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed Oct 19, 2005 7:14 am Post subject: Virtual Hosting Hack (Older Clients) |
|
|
Virtual Hosting did not exist in older web browsers, so I thought of an idea
to redirect them to a certain web page. This method actually works, I used
WebBug to test it. Do a Google search and try WebBug with this.
In order for this to work, your default host will be the target for these old
timers. If a Virtual Host fails, they will end up on the default host. You will
need to rename your default host's index.html to index.php
Once you renamed the index.html to index.php, you insert the following
code at the very top of your index.php file before the HTML.
Note: This also works with ::Virtual Host Creator::, I recommend buying
the Professional version of Abyss Web Server, if you want true V. Hosting.
Note: You also need to have PHP installed for this to work.
http://www.aprelium.com/abyssws/php.html
Code: |
<?php
if (!isset($_SERVER["HTTP_HOST"])) {
header("Location: /vhost_error.html");
exit;
}
?>
|
The vhost_error.html page, should have information saying that the
browser failed to send the HTTP_HOST header, and that they should
upgrade their browser and try the website address again.
Example: http://www.trustabyss.com/vhost_error.html
Sincerely, TRUSTpunk |
|