aebstract Posted February 18, 2009 Share Posted February 18, 2009 I don't know what subject to use really, but here goes my issue I'm about to face. I have a website that uses index.php as the base file which is normal.. So when you go to lalala.com index.php is the default file that runs. Well, I'm needing to introduce a splash page to this lalala.com so that the user clicks to enter one of two locations. One of the locations should default back to that index.php and the other will be something like lalala.com/lala/. Is there a way to force something other than index.php as the default? Possibly a "splash.php" or something? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/145817-solved-force-something-besides-indexphp/ Share on other sites More sharing options...
allworknoplay Posted February 18, 2009 Share Posted February 18, 2009 I don't know what subject to use really, but here goes my issue I'm about to face. I have a website that uses index.php as the base file which is normal.. So when you go to lalala.com index.php is the default file that runs. Well, I'm needing to introduce a splash page to this lalala.com so that the user clicks to enter one of two locations. One of the locations should default back to that index.php and the other will be something like lalala.com/lala/. Is there a way to force something other than index.php as the default? Possibly a "splash.php" or something? Thanks The default index pages are set in your Apache or IIS config. then from there, you can redirect the user to whatever pages you want after the splash page. Quote Link to comment https://forums.phpfreaks.com/topic/145817-solved-force-something-besides-indexphp/#findComment-765599 Share on other sites More sharing options...
Stooney Posted February 18, 2009 Share Posted February 18, 2009 Read this: http://www.cyberciti.biz/faq/apache-display-or-change-a-default-page-other-than-indexhtml/ Quote Link to comment https://forums.phpfreaks.com/topic/145817-solved-force-something-besides-indexphp/#findComment-765600 Share on other sites More sharing options...
nevesgodnroc Posted February 18, 2009 Share Posted February 18, 2009 you could put in a header based redirect on your main landing index.php to for the loading of any other page you specify and then take user input to decide wheter to show which page to show <?php $go = "Location: ".$url; header($go); ?> Just remember that you cannot have any output before the header($go); line or it will not work also you may think about incorporating a cookie that checks if the user has already been to the page and decided whether or not they want to see you spash page or not and act accordingly Quote Link to comment https://forums.phpfreaks.com/topic/145817-solved-force-something-besides-indexphp/#findComment-765670 Share on other sites More sharing options...
aebstract Posted February 19, 2009 Author Share Posted February 19, 2009 works perfect, ended up putting this in my .htaccess: DirectoryIndex /splash/index.html /splash/index.php index.pl index.php index.html Quote Link to comment https://forums.phpfreaks.com/topic/145817-solved-force-something-besides-indexphp/#findComment-766114 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.