Website Structure?

the_site

New Member
Messages
159
Reaction score
1
Points
0
Hello everyone, I just have a quick question. I am just wondering is there any specific way of structuring your website?

As you see sites that have multiple layers/directories...

Example:
http://website.com/name1/name2.html

On /name1/, does it have to be a page, folder, or any when you structure your website?
I am guessing when you make /name1/ folder/directory you need an index in it right?
 

priyaa161

New Member
Messages
553
Reaction score
24
Points
0
You can structure it in anyway to find easy to manage. And yes we need an index in it.
 

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
I normally do the following for APPLICATIONS or PROGRAMS that need a members area and a admin area:

domain/index.php(or html)
domain/styles/images/<images>
domain/styles/stylesheet.css
domain/includes/functionlists.php
domain/classes/stuff.php
domain/mem/index.php
domain/acp/index.php

Depending on what you do I change it up, there are a lot of ways you can do it...

You just need to remember that folders are helpful. When you create a set of pages that are all linked to one another and they have a specific purpose, like showing the user a bunch of images or something, you should put into a directory like www.domain.com/portfolio/page.php instead of placing all the pages into the main directory.

Just do it how you'd do it on your own computer, you want large quantities of files to be seperated and organized, if you only have a few files you may not have any folders. (maybe /images or /styles)
 

the_site

New Member
Messages
159
Reaction score
1
Points
0
I just wasn't sure if there was any specific way of structuring a site.
I got the perfect answer from both of you two;" You can manage it any way you would like, as long you know how its structured."

Once again thanks!
 

jasons61

New Member
Messages
1
Reaction score
0
Points
0
I normally do the following for APPLICATIONS or PROGRAMS that need a members area and a admin area:

domain/index.php(or html)
domain/styles/images/<images>
domain/styles/stylesheet.css
domain/includes/functionlists.php
domain/classes/stuff.php
domain/mem/index.php
domain/acp/index.php

Depending on what you do I change it up, there are a lot of ways you can do it...

You just need to remember that folders are helpful. When you create a set of pages that are all linked to one another and they have a specific purpose, like showing the user a bunch of images or something, you should put into a directory like www.domain.com/portfolio/page.php instead of placing all the pages into the main directory.

Just do it how you'd do it on your own computer, you want large quantities of files to be seperated and organized, if you only have a few files you may not have any folders. (maybe /images or /styles)


folders have helped me so much especially when backing up and re transfering files! its much more organised!!:biggrin:
 

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
It really depends what you're using it for.

For example, my structure:

index.html
images/
style.css

And another of my structures:

index.php
page1.php
page2.php
admin/index.php
admin/pagex.php
admin/style/css
admin/style/images
style/css
style/images

It really depends what you're using it for.

~Callum
 

farscapeone

Community Advocate
Community Support
Messages
1,165
Reaction score
27
Points
48
Now you have to separate display form structure. Structure is the way you store files on the server and it depends on what you need and feel comfortable with. On the other hand display is what you defied as http://website.com/name1/name2.html in your example. This does not have to follow the structure of the files and folders on the server. It's typically made to be user and SEO friendly by following some kind of logic. For example, in wordpress you have "www.example.com/2010/05/some-article/" as URL but there are no "2010" and "05" folders. It's structured this way to point out the date and article name for better understanding of the URI. This method is popularly called "Fancy URL" and it's based on Rewrite Engine and .htaccess file.
 

the_site

New Member
Messages
159
Reaction score
1
Points
0
For example, in wordpress you have "www.example.com/2010/05/some-article/" as URL but there are no "2010" and "05" folders.

I did notice that and I heard about the Rewrite Engine and .htaccess file.
To Rewrite Urls and redirect right?
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
Yep, you use it to make neat, short urls that point to non-existant addresses point to long, complex urls that do exist. It basically just makes it nicer for users to remember pages etc.
e.g.
User will enter "http://www.example.com/2010/05/some-article/" in their browser, but the server will interpret that as "http://www.example.com/scripts/getarticle.php?year=2010;month=05;article=somearticle"
 
Top