SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What to make index.php simply "/"

    what code would I have to add to my .htaccess file in order to take the /index.php and change it to simply "/"

    better example

    ZXX.com/index.php

    to

    ZXX.com/


    There is on more stipulation, I have some other pages that are index.php?file=insertcommandhere and I don't want those pages to parse either.

    Ewww, hope anyone can understand what I'm saying, I suck at writing or explaining code, LOL
    Last edited by FSN; Sep 28, 2002 at 06:06.

  2. #2
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, change that link! Or at least shutoff "auto parse URLs" and unparse them. Without thinking, I clicked it and off I went to some porn site that took about 100 clicks to get out of!!

    Anyways...

    .com/ should open up to your index.php file, although on some servers it will always go to the index.html file, if there is one of those as well, so the best thing to do would just be to change that to home.html or something like that.
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OOPPPSSSS!!!!!!!!!!!!!

    sorry about the link problem, wasn't thinking at all

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do want .com/ to open up to my index file but in the browser I'd still like it to appear as simply .com/ and not .com/index.php

  5. #5
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by FSN
    I do want .com/ to open up to my index file but in the browser I'd still like it to appear as simply .com/ and not .com/index.php
    It should do that. I mean, www.sitepoint.com goes to their index.php file, but it stays as "www.sitepoint.com".
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  6. #6
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    To anyone that needs an answer to this

    I found if you put the following code in your index.html file it will always show xyz.com in your browser but show the your info from your xyz.com/index.php

    Code:
    <HTML> 
    <frameset cols="100%,*" frameborder="NO" border="0" framespacing="0"> 
    <frame src="index.php"> 
    <frame src=""> 
    </frameset> 
    </HTML>
    now everything is purrrrrfect, lol

  7. #7
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are using Apache create a file called .htaccess in your root directory with the following in it:

    Code:
    DirectoryIndex index.php
    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  8. #8
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    @ Sean. Or ask your host to do it for you. The makeshift solution you've implemented creates far more probs than it solves....
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS


Bookmarks

Posting Permissions

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