The Mother Board

Motherboards.org forums. Free tech support, motherboard ID, and more.
It is currently Fri Sep 21, 2018 8:09 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Dec 20, 2005 10:57 pm 
Offline
Brown Belt
Brown Belt

Joined: Sun Mar 02, 2003 1:44 am
Posts: 281
Location: Vancouver, BC, Canada
Hi all -

This is probably a silly question, but how does one set a particular file or page to run when a particular website is accessed -

e.g. www.example.com

My problem - I have uploaded my site to the host server, but when one navigates to that address, they get the index list of all files, etc. on the site.

Instead, what I want is for them to get the homepage I intend. Of course, if one knew the page, they could simply add it into the address line...

e.g. www.example.com/homepage.htm

What is the way to default to have the person default to the home page by only typing in the website (minus the actual homepage file)?

(I hope this question is clear, and not confusing).

All answers appreciated - thanks!

T.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 20, 2005 11:43 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14301
Location: Maine
It is done via you Apache httpd.conf file or .htaccess files..... All depends on your hosting package. Who do you have as a webhost?

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 9:22 am 
Offline
Brown Belt
Brown Belt

Joined: Sun Mar 02, 2003 1:44 am
Posts: 281
Location: Vancouver, BC, Canada
Ah, I was sort of on the right track - I had started to fiddle with the .htaccess file, but the tutorial/help provided by the webhost did not really cover that very well. I use Bluehost, by the way.

Can you (or anyone) provide a simple example showing code that would load a particular page upon navigation to a site?

I fiddled with redirect, trying to redirect to a file, but I am thinking that command only allows one to redirect to directories/folders, not specific files.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 9:57 am 
Offline
Black Belt 4th Degree
Black Belt 4th Degree

Joined: Sun Dec 28, 2003 8:26 pm
Posts: 4941
Location: Norwich, UK
I just uploaded index.htm to my publichtml file and bam, it worked, but my host is for beginners

_________________
Image
Jocuri cu impuscaturi si alte genuri, pentru toate varstele doar pe acest link - distractie si amuzament garantat!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 11:39 am 
Offline
Brown Belt
Brown Belt

Joined: Sun Mar 02, 2003 1:44 am
Posts: 281
Location: Vancouver, BC, Canada
Thanks for the reply. I too tried that, as the help indicated that there should be an index.htm file present. However, that didn't do anything - it still just listed all the files and directories...

Based on the previous response, I am guessing that if this .htaccess file is present, it probably needs to have something in it to direct to the home page file (??).

(While on the topic of the index.htm file, however, is that always required? Previously, I used free website hosting from my usual ISP, and just linked to a particular file (not index.htm) when linking to my home page.)

Still hoping someone can give an example of what the .htaccess file should contain in order to set a particular file as the default page.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 2:08 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14301
Location: Maine
Will post something later tonight after work.

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 7:27 pm 
Offline
Brown Belt
Brown Belt

Joined: Sun Mar 02, 2003 1:44 am
Posts: 281
Location: Vancouver, BC, Canada
Ah, much appreciated, Toby!

T.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 9:29 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14301
Location: Maine
Create a text file and name it .htaccess. Insert this text into the .htaccess file!

Code:
DirectoryIndex index.htm index.html index.html.var


This should allow the use of .htm extensions, to prevent seeing a file tree when trying to access the page/directory...

I hope this helps..

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 9:48 pm 
Offline
Brown Belt
Brown Belt

Joined: Sun Mar 02, 2003 1:44 am
Posts: 281
Location: Vancouver, BC, Canada
Hi Toby -

Awesome, got it to work (after noobishly entering everything you listed under code, all 3 versions of the index reference :P).

I take it, however, that I must use a file named "Index.***" - it's not possible to refer to a file without that naming scheme?

Anyway, I'll rework the links - thanks again for the help - greatly appreciated! :)

Thrustwyn


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 11:17 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14301
Location: Maine
Quote:
it's not possible to refer to a file without that naming scheme?
Its probably possible, but not sure if it would work....

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group