PDA

View Full Version : Redirection Problem



johnleeryan
11-12-2003, 07:45 AM
How can I redirect my web site ex. domain.com to a page i want.
Like when people goto http://domain.com, they will redirect to http://domain.com/mypage.htm

ProWebUK
11-12-2003, 08:14 AM
create an index.php file with the following:

<?php
header("location: http://domain.com/mypage.htm");
?>

alternatively rename mypage.htm to either index.htm index.html or index.php

Chris

johnleeryan
11-12-2003, 10:15 AM
I try before but still can't.

ProWebUK
11-12-2003, 10:32 AM
tried the redirect or renaming your page?

A redirect will work if you have php enabled, renaming to a recognised DirectoryIndex will also work, contact your host /system administrator and confirm that index.htm / index.html are all listed against the DirectoryIndex in the servers httpd.conf.

Chris

l0rdphi1
11-12-2003, 11:01 AM
or if you have curl enabled, have your tried this?
<?php include "http://domain.com/mypage.htm"; ?>

johnleeryan
11-12-2003, 06:38 PM
Okay . This has settled. Now i would like to know how to redirect a subdomain.

ProWebUK
11-12-2003, 06:45 PM
you can follow the same method with a subdomain