Server-Side Page Redirect

hostnews.com

New member
CPanel has a nice redirect option; I recently switched to MediaTemple and they do not..

How do I do a server-side redirect within their control panel if they don't have that option automatically implemented? Is it even possible?

AIM: HNewsRep :dance:
 
You should be able to do this pretty easily. I think this is what you are trying to do :
PHP:
<?php 
switch ($_GET['link']) {
default: 
    $contents = @file_get_contents("content/error404.txt")  ;
    break;
case services:
    $contents = @file_get_contents("content/services.txt") ;
    break;
case about:
    $contents = @file_get_contents("content/aboutus.txt") ;
    break;
case hosting:
    $contents = @file_get_contents("content/hosting.txt") ;
    break;
case design:
    $contents = @file_get_contents("content/design.txt") ;
    break;
case mailer:
    $contents = FALSE ;
    break;
}
Of course with this code, you need to know the exact number of pages you have. You could just run it wildcard and I'm sure there are many options around, including actually intergrated into cPanel. This is just a last resort really and I use it for my smaller sites.

REGARDS,
~Equinox
 
Back
Top