This is a discussion on "Optimal file structure on the server" within the Website Planning section. This forum, and the thread "Optimal file structure on the server are both part of the Planning Your Website category.
|
|
|
|
|
![]() |
||
Optimal file structure on the server
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Optimal file structure on the server
Hi!
I've run into a problem with my site, which I hope someone can help me get rid of. As usual I have an ant heap of questions and thoughts, but I'll try to explain the problem carefully. What I want to accomplish is a site with CSS styles, a JS-menu, where the pages are composed by several .asp files. I'm about to start creating all unique pages, but it struck me that some subfolders on the server would be useful to make it easier to maintain the site... This is what I'd like it to look like: WEBROOT L scripts (my menu and css) L images (pictures) L _products (folder containing all unique files for "products" L _services (folder.....) L _justnu (folder...) L _.... All files corresponding to the choices in the menu directly in webroot. But this doesn't work as I thought it would, and I don't understand why Is there a better more "safe" structure to use? How should my structure look like to work as I want it to do? I've created a template that looks like this:
Is it correct to assume it is possible to include a file from another folder like this? Can it somehow be connected to how my metahead.asp file is coded? (There are probably many better ways of doing this, but I believe I must still be considered a newbee.)
Where does the server get lost and what have I done wrong? Kind regards, Foobster |
|
|
|
|||
|
Re: Optimal file structure on the server
I'm not familiar with ASP (I use old-fashioned SSI), but here's a couple of ideas:
|
|
|||
|
Re: Optimal file structure on the server
Thanks for your reply MikeHopley!
What you saw and noted on was just a lame attempt to illustrate the file tree... The folders do not have spaces. I've named them: _information _justnu _kontaktaoss etc... Why am I using .asp? No idea, first I thought it was necessary for including files in this way. And on .asp-sites many considers .asp to be a better than .inc. So, for the moment, there is really no reason for me to use asp, since including files can be done with plain html? I haven't tried coding it without includes, but since my problem is specifically connected to them I don't see how it'd help me uncover the problem. I know about the two ways, "file" and "virtual". They should both work... but I think the problem can be linked to how I had divided my template. Here is an attempt to describe the problem: webroot contains : folder1 (css-styles, and JS-menu) folder2 (an asp-file containing a heading and a paragraph) metahead.asp (meta-text) menu.asp (the menu) menu-alt1.asp ... menu-altx.asp footer.asp (a footer) What I want to do in every menu-alt-file is: Apply title, and eventual override styles, etc... include metahead.asp from same dir include contents from folder2 include footer from same dir (Until a moment ago I called the style sheats from folder1 in metahead.asp. I thought this was brilliant, but I have now changed it and put the links in every menu-alt-page instead, just in case this was causing some problems...) But the problem remains, the code below does not work. <!-- #INCLUDE FILE="justnu/torsdagar.asp" --> However, it seems like it works if I change the extension to something else... anything else. (I'm sure I tested this before, but perhaps not when I had the style links in the metahead-file. Perhaps I should put them back there...) This raises some questions which has more to do with asp and ssi, which I'll address in that forum instead. |
|
|||
|
Re: Optimal file structure on the server
More to the topic then, as my other problem seems to have been the servers fault...
Is it a good idea to create a folder for each menu, and store the unique contents (to include) in there? Some seem to have ONE folder containing all includes instead, but I think this would make it harder to understand the structure of the site in relation to the file structure on the server. And since the site will be maintained by people with with an even more (extremely more) newbeeility than I, I though this approach would help. Folders or not, how do you arrange your sites? |
|
|||
|
Re: Optimal file structure on the server
I use almost the same structure as Karinne's, but I put all my "techy stuff" inside a source folder:
root / |-- source / |-- css /|-- images / |-- some-site-content-section / |-- another-site-content-section / The second "images" folder is for content images, as opposed to design decorations. |
![]() |
| Tags |
| file structure, folders, includes |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing an XML file from Localhost to Server... | JustinStudios | Classic ASP | 1 | Apr 13th, 2007 21:27 |
| Upload File to Server Via Email | Kenny Fix | Classic ASP | 0 | Nov 6th, 2006 17:10 |
| URGENT!!!! Send HTTP request from one web server to another server | chandra.nowduri | ASP.NET Forum | 1 | Aug 7th, 2006 19:18 |
| Need to process data on one server, utilize it on another server ... can it be done? | jaobrien | Classic ASP | 1 | Dec 6th, 2005 00:58 |