Forum Moderators: open

Message Too Old, No Replies

Setting the Homepage

i've never understood how this works

         

salo

6:45 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



i can't believe all this time i've never understood how this works. i have always used index.html as my homepage, and never used another filename. i see on dreamweaver if you right click the file you can select 'set as homepage', but where does that code go? and when using this option it will work through ftp, but not on winSCP. any suggestions on how to do this?

thanks
salo

Storyman

6:50 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



Homepage is usually index.htm or index.html. What is important is that you place an index.htm/html page in every folder (even folders that are only images) or otherwise it is possible for someone to type in the url for the directory without an index.htm/html and get a directory of all your files--and worse!

salo

6:54 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



but if you are on a remote view (winSCP) and want to set 'firstpage.php' as your homepage, how would you do that?

lZakl

8:44 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



^^ Why would you want to? It:

1) Makes it difficult to move the site should you have to

2) keeping track of your pages could become cumbersome at that point.

3) index.html is the standard, what purpose would firstpage.html serve?

What is the advantage of what you are trying to do?

-- Zak

jatar_k

9:02 pm on Jun 24, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> how would you do that

it would be set in Apache, if you use Apache. I imagine IIS has similar settings

eljaykay

2:50 am on Jun 26, 2005 (gmt 0)

10+ Year Member



Hi -
Get to know your Host / server file structure really well. You'll need to know all of the correct file paths, to find out what kind of access you have to set permissions, where certain types of scripts should go, etc.

You may be able to set the public-html index to another page - or have to, depending on the host's setup. [I usually do Linux/Unix server set-ups, so not sure about MS, nor have I installed DW: just the Flash, ma'am.]

Good luck,
El

P.S.:
Actually take the time to make my own local, 'portal' webpages - set as the homepg. in browser - so it's the first thing I see when online!

--throw rocks & garbage now--

sonjay

5:35 am on Jun 26, 2005 (gmt 0)

10+ Year Member



Dreamweaver's "set as home page" function has nothing to do with the server; it's only there for DW to know which page you want to use as the home page when generating site maps and stuff like that.

On an Apache server, the default page is set in the DirectoryIndex directive in your httpd.conf file. You can list multiple filenames that you want to serve as the default home page. Apache will go through the list in order. So if you have:

DirectoryIndex index.html index.htm index.shtml index.php

in your httpd.conf file, the first default home page will be index.html. If there's no index.html, Apache will look next for index.htm, then for index.shtml, and so forth.

I believe you can also use the DirectoryIndex directive in your .htaccess file.

You can specify any filename you want as the default. You could set webmasterworld.html as your default home page if you wanted.

I have no clue how it's done on IIS.

g1smd

10:47 pm on Jun 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



When you link to an index file, never mention the index file filename in the link. End it with the folder name followed by a trailing / on the URL. This allows you to change the filename from index.html to index.php without having to change any of the links at all.