How do i setup the index please?


#1

i just uploaded the website in the folder mywebsite.com , when i type www.mywebsite.com i see folders and my index.html , i want that when i type www.mywebsite.com it load automaticaly index.html , how do i do that?
thanks


#2

if you uploaded everything correctly you should see the index.html automatically since when you type www.mydomain.com The first that is loaded is the index.html

Are you sure you placed everthing in the correct folder?


#3

It should be doing that already, as index.html is a valid file name for an index file.

Could you post the URL for your site?

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#4

sorry index.html is just an example the name of my file is home.html do i really have to rename it to index.html?

also in some directories for example mywebsite.com/subject1/
i want subject1.html to load automaticaly when someone type
www.mywebsite.com/subject1
thanks guys for your support


#5

The easiest way is to rename both files (home.html and subject1.html) to index.html.
All the best -
marsbar


#6

Well, according to this wiki article, home.html is already a valid name for the default index file. Remember that case is important, confirm that your filename (and extension) are both lowercase.

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#7

thanks okey i’ll check but what about the other thing that i want to do ?
"i want subject1.html to load automaticaly when someone type
www.mywebsite.com/subject1"
thanks again


#8

I agree with marsbar, for several reasons. That said, if you want to use "subject1.html, subject2.html, etc., you will need to place an .htaccess file in each subdirectory changing the index settings to facilitate the use of those file names as appropriate.

To learn how to do this, click the .htaccess link in the wiki page Mark (Raz2133) has pointed you to. Good Luck!

–rlparker


#9

Sorry, I didnt see the second question. :blush:

You can do this by creating a .htaccess file containing the line below and placing it in the directory;

DirectoryIndex subject1.html

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#10

Ah, didn’t know that - thanks for the info, Raz.


#11

See my previous reply…

–rlparker


#12

thanks guys this htaccess file thing is exactly what i need and what i wanted to know
i’ll try to install things and comback if i have any problem :slight_smile:
thanks


#13

A couple of problems you might run into…

Firstly, if you are using Windows, it can be a pain actually creating a file named .htaccess, as Windows doesn’t seem to like files with an extension only. I usually create the file as htaccess.txt and rename it after uploading to my server.

Secondly, remember that .htaccess is a ‘hidden’ file, and will not be shown in your FTP client unless the client is configured to show hidden files.

Good luck.

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#14

I just went through this on my sites. I was coming from a Windows server environment where they establish the default files and you assign a priority The first one is index.htm and then you can add index.php etc

Anyway when I first got here to Dreamhost I was freaking out when all the directories were showing up with all the files. I had a few that had default.php as the index page.

Anyway after following the wiki and a post or two here I saw that I could create the .htaccess file and solve the problem. I just use the webftp link to my sites from the control panel. Once there I create the .htaccess file and paste in the code and save it. Its done. I am not used to using the .htaccess files but now I am thrilled at the convenience they offer and the control.

-tach55