SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Is it possible to remove/change .php extension from my website?

    Hi,

    I saw a php-based website that had different extension on its files (I think all files ended in .hay). How did they do that? Is it easy?

    Also, how do you set up php so it loads a different default page from (i.e. not index.php)

    I'd like to get rid of this http://www.example.com/index.php

    Thanks!

    melissa

  2. #2
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I saw a php-based website that had different extension on its files (I think all files ended in .hay). How did they do that? Is it easy?
    Sure. In httpd.conf or a .htaccess file:
    AddType application/x-httpd-php .php .foo .bar .whatever

    Also, how do you set up php so it loads a different default page from (i.e. not index.php)
    http://httpd.apache.org/docs/1.3/mod...directoryindex

  3. #3
    SitePoint Evangelist
    Join Date
    Feb 2005
    Posts
    581
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What server are you using? Apache? In your httpd.conf file, change "AddType application/x-httpd-php .php" to "AddType application/x-httpd-php .ext" where .ext is your extension. Next, change all your extensions to that and restart Apache. That's it; you're set!

    Now for the next question: Find "DirectoryIndex index.html" in httpd.conf and add the filename you want to be loaded as your starting page.
    I will not flame the newbies,
    I will not flame the newbies,
    I will flame the newbies...
    Table free is the way to be!

  4. #4
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, Apache!

    Thank you guys! This sounds great and EASY!

    melissa


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
  •