1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Adnetwork not validating one solution

Discussion in 'Co-op Advertising Network' started by jwtimmon, Dec 12, 2004.

  1. #1
    Thought I would post this here for someone elses benefit

    My host used the following in an index.html to redirect to index.php for some reason.


    <HTML>
    <BODY>
    <script>
    document.location="/index.php";
    </script>
    </BODY>
    </HTML>


    This obviously messed up validating the site.

    Renaming this to something else e.g. oldindex.html solved the problem.
    Also worth checking the httpd.conf for the following line

    #
    # DirectoryIndex: Name of the file or files to use as a pre-written HTML
    # directory index. Separate multiple entries with spaces.
    #
    <IfModule mod_dir.c>
    DirectoryIndex index.html index.htm index.shtml index.php ...
    </IfModule>

    The index.php bit is the most important and if its only php you use you can delete the rest so it reads

    #
    # DirectoryIndex: Name of the file or files to use as a pre-written HTML
    # directory index. Separate multiple entries with spaces.
    #
    <IfModule mod_dir.c>
    DirectoryIndex index.php
    </IfModule>

    but do yourself a favour and comment out the old line and write a new line so that in 6 months time when you are scratching your head why index.htm? isn't working and you are reviewing your conf file it hits you smack in the face :D

    So it would look like

    #
    # DirectoryIndex: Name of the file or files to use as a pre-written HTML
    # directory index. Separate multiple entries with spaces.
    #
    #Deleted irrelevant stuff on xx/xx/xxxx
    # DirectoryIndex index.html index.htm index.shtml index.php ...
    <IfModule mod_dir.c>
    DirectoryIndex index.php
    </IfModule>


    Hope this helps

    John
     
    jwtimmon, Dec 12, 2004 IP
  2. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #2
    For Apache, you can also do this in a .htaccess file, and it's also useful to list many different types of indexes, and Apache will show the first one in the list:

    DirectoryIndex index.php index.html index.htm default.php default.html default.htm

    Apache will search for:
    index.php
    then index.html
    then index.htm ... etc
     
    Matts, Dec 12, 2004 IP