contor 0 Report post Posted September 22, 2006 I need a scrip that redirects to my forum to index_cm.php, i cant change the name of that file Share this post Link to post Share on other sites
AeonLan 0 Report post Posted September 22, 2006 (edited) Put this at index.php <?php header("Location: index_cm.php"); exit();?> Happy ~Coding Edited September 22, 2006 by AeonLan (see edit history) Share this post Link to post Share on other sites
contor 0 Report post Posted September 22, 2006 (edited) Thanks Edited September 22, 2006 by contor (see edit history) Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted September 22, 2006 Or modify your .htaccess file such that index_cm.php is the "home" page for the directory/account. Either way would work.I believe there is a Tutorial on modifying the .htaccess file to perform such a task.On the otherhand, the above posting would also work, your call. Share this post Link to post Share on other sites
contor 0 Report post Posted September 22, 2006 if i do that all pages will sayd as home index_cm.php that is a big bathch on securyti if i dont change the name of all homes i use to protect the server Share this post Link to post Share on other sites
Jezdo 0 Report post Posted September 22, 2006 Whell, that header(); function is 'bad' . I use JavaScript or meta tag: java script: <body onload="windows.location.href('location.php');"> Meta: <meta http-equiv="refresh" content="seconds_to_redirect;URL=url"> E.g.: <meta http-equiv="refresh" content="2;URL=index.php"> This will redirect you on file index.php in 2 seconds. Share this post Link to post Share on other sites
contor 0 Report post Posted September 22, 2006 you are right i work very fine thanks i will set it in my page right know Share this post Link to post Share on other sites
BuffaloHelp 24 Report post Posted September 23, 2006 Actually, using javascript is worse... what if a user diabled java with the browser? Then javascript is useless. Well anyway, topic was answered and now closed. If you would like to continue this discussion please PM a moderator.Thank you. Share this post Link to post Share on other sites