Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2009
    Location
    California
    Posts
    27
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question How to code a splash page?

    Hi there,
    I have a client who insists on adding a splash page to an existing site. (He wants to show a short slideshow of a few photos and an "enter" button to go to the home page.)

    Normally, URLs are directed tothe index.html page when they are loaded. How do I name the splash page to have it be the first thing that pops up when users go to the URL?

    Can I keep the actual home page as the index.html page or do I have to call the splash page index.html and then rename the other home.html? Seems there is a way around this, I just can't figure it out.

    His site is in html, not php. I am not rebuilding his site, just trying to add this feature for him. Can anyone give me some guidance as to how I can achieve this?

    Thanks in advance!

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    In apache, you could write a DirectoryIndex directive to tell the server about the default index page. See http://www.htaccesselite.com/directo...mple-vt39.html
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    The problem with actually renaming the page is that you would need to update every link that goes to that page. So if someone goes to http://www.example.com right now, it would take them to the current http://www.example.com/index.html. If you rename that page to home.html, it would cause issues once someone goes into the website. Suppose they go to a "Contacts" page, then they click a link to return home. It would link them to http://www.example.com/ or http://www.example.com/index.html (which would redisplay the slideshow for them).

    If I was doing this, I wouldn't create a new page. I would use a "lightbox" (see http://www.justinbarkhuff.com/lab/lightbox_slideshow/ for one of many examples). Then you could just embed this into the existing index.html and you wouldn't need a new page.

    I would recommend a javascript cookie to make sure the slideshow only shows for the user once per session (i.e. don't show every time they go to the homepage).

  • #4
    New Coder
    Join Date
    Nov 2009
    Location
    California
    Posts
    27
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you both very much for your responses. I will take these options into consideration for my client.

  • #5
    New Coder
    Join Date
    Apr 2010
    Location
    Norfolk, UK
    Posts
    34
    Thanks
    0
    Thanked 2 Times in 2 Posts
    If its a small site, changing links isn't really an issue.

    I've done this for a couple of clients before with reasonably small sites...I rename the existing home page to index2.php & the new splash page becomes index.php.

    I use a php include for menus so I change the link in one place & its done across the whole site...makes life a lot easier for change like this.

  • #6
    New Coder
    Join Date
    Nov 2009
    Location
    California
    Posts
    27
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by craftygeek View Post
    If its a small site, changing links isn't really an issue.

    I've done this for a couple of clients before with reasonably small sites...I rename the existing home page to index2.php & the new splash page becomes index.php.

    I use a php include for menus so I change the link in one place & its done across the whole site...makes life a lot easier for change like this.
    haha you're reading my mind. This is essentially what I did- index for splash and index2 for home. The client only has three other internal pages so redoing the links was a breeze. This was my logical "plan b" approach and it works perfectly.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •