Reply
Website folder structure
Old 05-15-2008, 07:56 AM Website folder structure
Novice Talker

Posts: 5
Hi all,

I want to create a website which will have 4 pages.

I'm not sure what folders to create in cpanel when i upload the pages though.

Should there be a seperate folder for each page?

Thanks.
Iotrez is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 05-15-2008, 07:06 PM Re: Website folder structure
vangogh's Avatar
Post Impressionist

Posts: 9,465
Name: Steven Bradley
Location: Boulder, Colorado
If your site is only going to have 4 pages you probably don't need to put them in separate folders. Separate folders make sense when your site grows beyond a certain point, but with 4 pages I wouldn't bother with separate folders.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
| Small Business Forum
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 05-15-2008, 09:56 PM Re: Website folder structure
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
So you have like:
http://www.example.com/
And you want:
http://www.example.com/index.html
http://www.example.com/page2.html
http://www.example.com/page3.html
http://www.example.com/page4.html
Or are you looking to do:
http://www.example.com/
http://www.example.com/dog
http://www.example.com/cat
http://www.example.com/mouse
The first you'd have:
/public_html/index.html
/public_html/page2.html
/public_html/page3.html
/public_html/page4.html
The second you'd have:
/public_html/index.html
/public_html/dog/index.html
/public_html/cat/index.html
/public_html/mouse/index.html
Though I'd have to agree with vagogh and say go with the first way.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 05-16-2008, 05:43 PM Re: Website folder structure
vangogh's Avatar
Post Impressionist

Posts: 9,465
Name: Steven Bradley
Location: Boulder, Colorado
Thanks for the expanded explanation Jerod.

And to reiterate I'm not sure such a small site needs the folder structure. You could use it, but it seems like overkill unless you have plans on growing the site.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
| Small Business Forum
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 05-16-2008, 05:50 PM Re: Website folder structure
Capt Quirk's Avatar
Extreme Talker

Posts: 223
Location: Flordidian
I tend to have the index in the root, other web pages in an html folder, images in an art folder... you get the point. Now, if there are several pages for this subject, and several pages for that subject, keep the web pages in separate subject folders.
Capt Quirk is offline
Reply With Quote
View Public Profile
 
Old 05-19-2008, 07:19 AM Re: Website folder structure
Skilled Talker

Posts: 52
Name: Larry K
You may wish to start out using separate folders for each page, thereby having the shorter URLs of:
www.example.com/
www.example.com/cat/
www.example.com/dog/

regardless of how small your site is now. This is accomplished by placing a file named index.html in each folder (directory).

Pros:
Shorter address -- www.example.com/cat/ not www.example.com/cat.html
You don't break existing links by changing from HTML to PHP or other scripts
You don't have to edit all of your internal links to accommodate the changes.

I use the DirectoryIndex in my .htaccess to reflect my default page name:
Code:
DirectoryIndex index.html index.php index.shtml
You can place as many names in there as you like, all on one line. If two default files exist in the same directory, as in index.html and index.php, the one that is listed first in the DirectoryIndex prevails.
=====
This is optional, but I have replaced "index" as the base name of my default page. In most cases, I have named the file after the directory name, so when I am editing files my editor's Recent Files list is not full of "index.html." To make that work, I use a DirectoryIndex entry in my root .htaccess that lists all of the directory names + .html (or .shtml, .php, etc. as needed).
L a r r y is offline
Reply With Quote
View Public Profile
 
Old 05-20-2008, 12:26 AM Re: Website folder structure
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
Larry it would seem easier to just use mod_rewrite for that.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Reply     « Reply to Website folder structure
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10900 seconds with 12 queries