Closed Thread
Results 1 to 6 of 6

Thread: before index.html/htm

  1. #1
    Junior Member sacha
    Join Date
    May 2006
    Posts
    27

    before index.html/htm

    Hello,
    Is there a file name that the servers are set to look for before index.html/htm? I would like to put up a holding page to temporarily make the main site not so obvious while I tinker with it.
    Thanks- Sacha

  2. #2
    Techie & Moderator Kieran
    Join Date
    Apr 2006
    Location
    Swindon, UK
    Posts
    777

    Re: before index.html/htm

    Only a staff member could tell you the actual order of preference that apache is set to check for index files on your server, but .html is usually the one that overides everything else. For example index.html will overide index.shtml and index.php

    This means your best plan is to add a .htaccess pointer to the index you want to show, so that to see the real index (which you might want to do in testing) you would have to go direct to the index.html page. Anyone going to just the URL with no page specified would see the page you specified in the .htaccess.

    The following code in a .htaccess file in the public_html directory will make the page they see on visiting your URL "holding.html". When you want to go back to normal, just delete the line in .htaccess

    Code:
    DirectoryIndex holding.html
    
    Hope this helps

  3. #3
    Junior Member sacha
    Join Date
    May 2006
    Posts
    27

    Re: before index.html/htm

    Thanks very much, that solves it for me!

  4. #4
    Junior Member sacha
    Join Date
    May 2006
    Posts
    27

    Re: before index.html/htm

    Is it kosher to use this same method for a re-direct to an outside url? I've tried it and it seems to function, just want to know if it is okay to do it this way.
    Thank you!

  5. #5
    Techie & Moderator Kieran
    Join Date
    Apr 2006
    Location
    Swindon, UK
    Posts
    777

    Re: before index.html/htm

    It depends what code you want to send to the browser or search engine that is accessing the URL. If you actually want to redirect to another url it is best to use temporary or permanent redirects which cause codes to be sent to the browser to indicate that a redirect has actually occured. You can activate such redirects in cpanel.

  6. #6
    Junior Member sacha
    Join Date
    May 2006
    Posts
    27

    Re: before index.html/htm

    thank you very much!

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. PHP includes on HTML page
    By Vic Carrara in forum Support Queries
    Replies: 3
    Last Post: 18th March 2008, 5:17 PM
  2. CGI/JAVA (html) Chat
    By Simon in forum Support Queries
    Replies: 2
    Last Post: 18th December 2006, 11:05 AM

Posting Permissions

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