Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/145817-solved-force-something-besides-indexphp/
Share on other sites

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.

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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.