redirecting index's

swirly

Active Member
Messages
1,930
Reaction score
0
Points
36
ok i have a cms i want the index of that to be my main index page...how can i like redirect it into the folder that it is in?
 

TarinC

New Member
Messages
698
Reaction score
0
Points
0
create a file called index.php and put it into the public_html folder

in index.php u should have:

PHP:
<?php
header("Location: http://youraccount.x10hosting.com/loacationofcms/");
?>
 

Cynical

Active Member
Messages
3,492
Reaction score
0
Points
36
You could use JavaScript too:
<script language="javascript">window.location="http://www.cynicalgames.com";</script>
 

bigguy

Retired
Messages
10,984
Reaction score
10
Points
38
Is this not the way the redirect should look ? If it doesnt matter thats cool but this is how I use a redirect in a index.php file:

PHP:
<?php
//Redirect browser
header("Location: http://sub.yourdomain.com");
?>

EDIT: I guess its the samething as the //redirect browser is commented out. Sorry bout that.
 
Last edited:
Top