Forum Moderators: mack

Message Too Old, No Replies

Automatically redirecting to index.html

         

kbaker

4:33 pm on May 22, 2004 (gmt 0)

10+ Year Member


Hi, I am new to HTML, and I have started a site on Geocities.com.
I am trying to find the easiest way to redirect from my directory to the directories index.html:
Like this:
www.geocities.com/1/
www.geocities.com/1/index.html
I am trying to do this so my Directory Listing does not show.
Anyone know an easy step-by-step way to do this?
Thanks.

Alternative Future

4:35 pm on May 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld kbaker,

By rights your directory should not show once you have an index in place!
So what you are saying even with the index in place you are seeing your contents?

Have you tried using index.htm?

-George

kbaker

6:23 pm on May 22, 2004 (gmt 0)

10+ Year Member



Sorry, what happens is, the index.html file works, and shows my web page, but if you type in the url, and the directory name:
www.geocities.com/1/
It shows the directory listing, with a listing of all the files in that directory.

I want it to redirect to index.html automatically:
so that it doesn't show the directory listing when a visitor types in www.geocities.com/1/ , it redirects to www.geocities.com/1/index.html

I have tryed using .htm & .html, and doing searches for this, with no luck.

Alternative Future

6:31 pm on May 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Am sorry but I don't fully understand, so the directory where you can view your contents has an index file held within it yet? Is this the root directory we are talking about here?

-George

Alternative Future

9:50 pm on May 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you sticky me an example or your problem?

-George

kbaker

3:59 am on May 23, 2004 (gmt 0)

10+ Year Member



I GOT IT!
I changed the index.html to index.htm and it works.
I did this 3 times before and nothing happened, but it is working now.
Thanks for your help!

mack

3:57 pm on May 23, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



This can sometimes be caused by your browser caching the page. You make changes to your setup and it still displays the old content.

Glad you got it sorted out.

Mack.

Lofty

7:25 pm on May 24, 2004 (gmt 0)

10+ Year Member



glad to see you've sorted this.

just as a future reference

the page that the folder gets redirected to is dependant on the mappings that the host has in place.

most of the time if index.ext dosent work then you should try renam,ing your file to default.ext

default.ext is the most common mapping followed by index.ext