index.php as homepage.

  • silentdreamer
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: Trapped in the mist of dark desires...

Post 3+ Months Ago

when i browse some of the phpbb sites, i noticed that some people uses index.php as their main page..... I can only use index.htm as homepage, so, how do you do that?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Your server has to include the index.php as a default page. If you don't have access to do that on your server, you'll need to ask your host to add it.
  • silentdreamer
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: Trapped in the mist of dark desires...

Post 3+ Months Ago

well. i am in the middle of moving to a new host. So, I think i'll be fine after i move. Thanks :)
  • conorific
  • Proficient
  • Proficient
  • User avatar
  • Posts: 350
  • Loc: NY

Post 3+ Months Ago

If it turns out that you can't get it:
-Format index.htm(l) like the following:

Code: [ Select ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META HTTP-EQUIV="refresh"
CONTENT="0;URL=http://DOMAINNAME.COM/index.php">
<title>TITLE HERE/title>
</head>

<body>
&nbsp;
</body>
</html>
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2.   "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <META HTTP-EQUIV="refresh"
  6. CONTENT="0;URL=http://DOMAINNAME.COM/index.php">
  7. <title>TITLE HERE/title>
  8. </head>
  9. <body>
  10. &nbsp;
  11. </body>
  12. </html>


-Then put your main page stuff in index.php.
-It's used here on my site to see what I'm talking about:
http://conorific.com/orig/

Hope I helped!
  • silentdreamer
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: Trapped in the mist of dark desires...

Post 3+ Months Ago

thank you very much! That was exactly the type of thing I was looking for! :wink: Thanks!
  • conorific
  • Proficient
  • Proficient
  • User avatar
  • Posts: 350
  • Loc: NY

Post 3+ Months Ago

Hey, no problem. S'what we're here for. ;)
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Even if the host doesn't have it configured to look for index.php by default, if the server is setup a certain way, you can override the filenames that the website looks for in a directory by default.

For example, osCommerce used to use "default.php" as its main index file. Most web servers aren't setup to look for this file if no specific filename is given.

Open up your text editor, insert the following line..

Code: [ Select ]
DirectoryIndex index.html index.htm index.php default.php

Then save it out as .htaccess and upload it to your website's main directory.

Now, it will first attempt to look for "index.html". If it doesn't exist, it will try to find "index.htm". If it can't find that one, it tries "index.php", and finally, if all else fails, "default.php". If it can't find any of the files mentioned above, it will usually come up with a page listing all the files in the directory, or "Directory Listing Denied" error page.

You can add any filenames you want to the .htaccess to tell it to look for, the nearer the beginning of the line, the higher priority it has.

So, in the example above, if you have both index.html and index.php in your root directory, if it finds index.html, it will display that and stop. index.php, in this case, will not be displayed unless you specifically put that filename in the URL. If you delete the index.html file, then it will display index.php by default.
  • conorific
  • Proficient
  • Proficient
  • User avatar
  • Posts: 350
  • Loc: NY

Post 3+ Months Ago

That's right. I had posted a thread about this before, and I forgot that solution because it didn't work in my case. Thanks, Axe! :wink:
  • silentdreamer
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: Trapped in the mist of dark desires...

Post 3+ Months Ago

thanks. I am not very good at this type of thing, so, my question may be a bit stupid. But if I am to have a Mod Rewrite in my htaccess. do i put your line before or after the mod rewrite? or does it actually matter? :roll:
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

It shouldn't matter either way, but I'd probably put it at the top.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Gentle reminder -- not every host is Linux. .htaccess won't work on a Windows server. If I'm wrong, someone please tell me how, because I can't figure it out.
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

Well if your windows server is using Apache then it will work, as .htaccess is for apache.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

ATNO/TW wrote:
Gentle reminder -- not every host is Linux.

.htaccess will work on a Windows server, but only if it's running Apache for windows (afaik).

But still, if your site's being hosted on a non-*nix server. Find a new host :mrgreen:
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

*lol --that much I know -- but I haven't used a Windows server yet, that does. *sighs
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

*lol --that much I know -- but I haven't used a Windows server yet, that does. *sighs BTW --AXE -- I specifically use Windows servers for ASP and .NET. Can't do that on Linux.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

You can do ASP on Linux, it just costs 600 bucks per server for the software licenses to support it :D

Besides, who needs ASP when you've got PHP? hehe
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I do. My company internal intranet, is already geared toward the .NET architecture, and I have no interest in changing that now.
  • silentdreamer
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: Trapped in the mist of dark desires...

Post 3+ Months Ago

anyone else here using Myprohost.com as their host? I am completely confused by their registration processes... I now made my purchase and recieved a product confirmation e-mail, so... are they gonna e-mail me again when my little account is ready? will they make me a username AND make me a password? when i register a domain name elsewhere, what should i do?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

They don't create the username & password for you, you have to tell them what it is...

Basically, the way I do it, is to buy my domain names, pointing the DNS at the host I know I'm going to be getting. THen, in a couple of days after DNS has propagated, on the MyProHost.com order form, I enter the name of the domain and the username & password I wish to use for the account.

Then that's good.

If you don't already have your domain name yet, if you've already paid for your hosting, but didn't supply then with a domain name, don't worry, just go ahead and register the domain name you want to use, and then pop them an E-Mail (if they don't send you one first) :)
  • silentdreamer
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: Trapped in the mist of dark desires...

Post 3+ Months Ago

done and done :wink: thanks! Now, I just wait for more replies from myprohosing.com:lol:

Post Information

  • Total Posts in this topic: 20 posts
  • Users browsing this forum: No registered users and 44 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.