You are either not logged in or not registered with our community. Click here to register.
 
December 04, 2016, 10:36:48 AM

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Click here if you are having problems.
Default Wide Screen Beige Lilac Rainbow Black & Blue October Send us your theme!

Hark!  The Herald!
Holiday Issue 2016

Wiki Blogs Dicebot

Author Topic: Folder structure for a website  (Read 391 times)

0 Members and 1 Guest are viewing this topic.

Offline KythiaTopic starter

  • Noooo-one Fights like Kythia no-one bites like Kythia
  • Dame
  • Enchanter
  • *
  • Join Date: Oct 2012
  • Gender: Female
  • No one chain smokes Marlboro lights like Kythia
  • My Role Play Preferences
  • View My Rolls
  • Referrals: 1
Folder structure for a website
« on: March 12, 2016, 06:36:08 AM »
So I've been dicking around making a website - not (or probably not) to ever go online, just as a project.  And I don't know how to organise my files: there seems to be a lot of advice around that, all of it different.

What I currently have is (where names in speechmarks are exact names, including capitalisation):

Main Folder
 - various .html files
 - "css" folder
 - - "stylesheet.css"
 - "js" folder
 - - various .js files (or, technically, nothing whatsoever.  Haven't looked at Javascript yet.  But whatevs)
 - "img" folder
 - - various images

Is that a good way of doing it?  Am I creating problems down the line?  Is there a better way?  Any other folders I need

Online AmberStarfire

  • Rogue Starlight ~ Fantasy Novelist ~ This Is Who We Are ~ Scully to his Mulder
  • Dame
  • Carnite
  • *
  • Join Date: Aug 2008
  • Location: Somewhere that makes me smile
  • Gender: Female
  • ❤ Snuggler of the Wyld and Hairy ❤
  • My Role Play Preferences
  • View My Rolls
  • Referrals: 1
Re: Folder structure for a website
« Reply #1 on: March 12, 2016, 09:26:41 AM »
That looks fine to me, though sometimes it's a good idea to give folders more unpredictable names so they can't be guessed as easily.

Personally, I'd look for a free CMS like Wordpress or PHP fusion and extract it into the folder associated with the domain. Some hosting companies have quick install scripts for them as well. It's much easier and quicker than building one from the ground up, and some like Wordpress have heaps of plugins and cool things out there you can more easily add.


Offline KythiaTopic starter

  • Noooo-one Fights like Kythia no-one bites like Kythia
  • Dame
  • Enchanter
  • *
  • Join Date: Oct 2012
  • Gender: Female
  • No one chain smokes Marlboro lights like Kythia
  • My Role Play Preferences
  • View My Rolls
  • Referrals: 1
Re: Folder structure for a website
« Reply #2 on: March 12, 2016, 12:21:32 PM »
That looks fine to me, though sometimes it's a good idea to give folders more unpredictable names so they can't be guessed as easily.

Why's that bad?

Quote
Personally, I'd look for a free CMS like Wordpress or PHP fusion and extract it into the folder associated with the domain. Some hosting companies have quick install scripts for them as well. It's much easier and quicker than building one from the ground up, and some like Wordpress have heaps of plugins and cool things out there you can more easily add.

Oh, I've no doubt.  But I'm not certain I ever want it online or anything, this is just something for me to play with - third party support would kind of negate the purpose at the moment.  If I ever decide its a real website rather than a toy/hobby then I may look at them (and thanks for the recommendation) but at the moment I'm having fun dicking around and reading W3C schools for everything I want.

Online AmberStarfire

  • Rogue Starlight ~ Fantasy Novelist ~ This Is Who We Are ~ Scully to his Mulder
  • Dame
  • Carnite
  • *
  • Join Date: Aug 2008
  • Location: Somewhere that makes me smile
  • Gender: Female
  • ❤ Snuggler of the Wyld and Hairy ❤
  • My Role Play Preferences
  • View My Rolls
  • Referrals: 1
Re: Folder structure for a website
« Reply #3 on: March 12, 2016, 12:42:06 PM »
Why's that bad?

It's easier for people to hack or explore in ways you might not intend. For instance, when people create a Wordpress site, there are typical names that each of the folders will have. Other changes would be required if someone changed the folder names, but it's what some people do to make their site 'less predictable' and more secure.

On a non-Wordpress site, using folder names like 'images' and 'css' is logical, which is why a lot of people do it. If site users type http://www.yourwebsitename.com/images, they might find your directory, and if they do, they might see a directory list of images. You can hide them by dropping in an index.html file, such as is discussed here, so it will load the index file instead:
http://stackoverflow.com/questions/19439348/what-is-the-best-way-to-hide-a-websites-folder-directory-files

And okay. Some people say some not-good things about W3Schools but I like their site a lot. It has a lot of information in one place and it's easy to find what you're looking for. They're actually not connected with the W3C, they just have a similar name. I have a PHP certificate from them (I didn't pay for it though. I got it through a class I studied).
« Last Edit: March 12, 2016, 01:05:45 PM by AmberStarfire »

Offline Vekseid

Re: Folder structure for a website
« Reply #4 on: March 12, 2016, 02:59:03 PM »
For simple projects - anything I'm not using a cms for - everything goes into one folder. View source on https://elliquiy.com for example.

Life's too short to fret about some of this stuff. >_>

Online AmberStarfire

  • Rogue Starlight ~ Fantasy Novelist ~ This Is Who We Are ~ Scully to his Mulder
  • Dame
  • Carnite
  • *
  • Join Date: Aug 2008
  • Location: Somewhere that makes me smile
  • Gender: Female
  • ❤ Snuggler of the Wyld and Hairy ❤
  • My Role Play Preferences
  • View My Rolls
  • Referrals: 1
Re: Folder structure for a website
« Reply #5 on: March 12, 2016, 04:20:55 PM »
You could do that too. :)