301 Redirect from Main Page (ie. without typing index.htm)

Discussion in 'Site & Server Administration' started by travoholic, Apr 11, 2007.

  1. #1
    Ok I've got a PHP file alive and kicking at http://www.travoholic.com/index.php and I have figured out how to redirect my index.htm page to this page, complete with PR and all that good stuff. The code I've used in my .htaccess file is this:

    redirect 301 /index.htm http://www.travoholic.com/index.php

    The problem is that when the user types in www.travoholic.com instead of the full www.travoholic.com/index.htm it doesn't perform the redirect.

    What to I put in my .htaccess file to make travoholic.com and travoholic.com/index.htm both point to index.php?

    This is giving me nightmares... all I want to do is get Text Link Ads working. I've tried putting the info into my .htaccess file to process all .htm pages as .php but this screws up my SSI. Is there a way to do this for just my main page since that's all I need right now?

    I will be forever grateful for anyone who can help me sort this out! Thanks!!
     
    travoholic, Apr 11, 2007 IP
  2. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In htaccess put
    DirectoryIndex index.php
     
    cyanide, Apr 12, 2007 IP
  3. Pammer

    Pammer Notable Member

    Messages:
    3,417
    Likes Received:
    397
    Best Answers:
    0
    Trophy Points:
    260
    #3
    yeah, if not working what cynaide said.. then ask again.. we sort out something.. but will be sort out i hope.
     
    Pammer, Apr 13, 2007 IP
  4. travoholic

    travoholic Well-Known Member

    Messages:
    299
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Thank you thank you thank you!!!
     
    travoholic, Apr 13, 2007 IP
  5. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #5
    no problem :)
     
    cyanide, Apr 13, 2007 IP
  6. Pammer

    Pammer Notable Member

    Messages:
    3,417
    Likes Received:
    397
    Best Answers:
    0
    Trophy Points:
    260
    #6
    no problem, kristy ;) i hope i can get visa for Canada? :D
     
    Pammer, Apr 13, 2007 IP
  7. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Pammer, YOu can get that answer by your local office:):D:eek:
     
    inworx, Apr 17, 2007 IP
  8. travoholic

    travoholic Well-Known Member

    Messages:
    299
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #8
    Actually on second look it seems like that answer has screwed up the rest of my pages. They all bring up directory lists rather than actualy page. ARG! It was great while it lasted.

    Pammer you can if you're under 30 and from any of a handful of Commonwealth countries...
     
    travoholic, Apr 17, 2007 IP
  9. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Set index to look for a index.php first, then if not found use index.htm
    DirectoryIndex index.php index.htm index.html
     
    rodney88, Apr 18, 2007 IP