Click to See Complete Forum and Search --> : Structure website and URL rewriting


mcbodee
03-17-2006, 02:50 PM
I'm interested in how members structure their websites. For example, do you tend to put all web pages in the root directory with a directory for all your images. Please can you give examples of how you setup your site. It probably depends on the no. of pages to how many directories you create, but if you could give examples of prevous setups that would be great.

Another thing I want to ask is has anyone done URL rewriting, how did you find it (difficulty wise) and when do you use it? I only found out about it today and have read a couple of articles, is it the way forward for security purposes?

Ultimater
03-19-2006, 04:03 PM
.........I usually have a a directory named "public_stuff" in the root for all the pages I never change yet leave there purely dedicated to the public so they can follow one of my links in the forums 10 years later. Usually coding examples that I link people to from the forums simply for the purpose of showing a real-world example and in no way connected to my actualy website.

.........In general, when coding a website, I like to keep pages that link to eachother within the same directory. (in otherwords pages that provide a clickable hyperlink for the user to click on that links to another page of the site)
i.e. if you have an index page and 5 links that the user can click on from the index page, I'd keep all 6 pages within the same directory. As far as the images, if the image is used very often, I'd store it in the directory "images" within the root. If the image isn't used as oftern, I'd put it in a seperate "images" directory within each sub-directory that requires it.
i.e. an index.htm page along with a page1.htm through page5.htm would be contained within the directory root/contacts/ and an image used as much as the website banner might have a URL like root/images/banner.gif. All other images that aren't used as much might have a URL like root/contacts/images/personalpic.jpg.