Page 1 of 1

Flat vs. Nested Site

Posted: Fri Apr 01, 2011 7:35 am
by lawebsite
Am taking over development of a pure PHP site, am somewhat new to this as a profession (have dabbled) - but the first thing I see is that all .php files less Structure (just Header, Footer) Images and Includes are under the root.

I have five sections I'd like to add URL structure to - not sure if best to do so or leave alone. I'd like to do something like:

http://www.site.com/topics/topics.php (or better yet, HTML to lead to PHP for SEO)
http://www.site.com/accounts/account.php (or better yet, HTML to lead to PHP for SEO)

Now it is set up as:

http://www.site.com/topics.php
http://www.site.com/account.php

There is a lot of back end code and hope I will not disrupt. Am using MAMP, Dreamweaver and tried a URL change in the header.php but these pages now do not show up (just blank, no error). Again, am learning. Am looking for expert advise to do this the right way from the beginning. Any books you learning materials you can point me to are appreciated.

Thank you.

Re: Flat vs. Nested Site

Posted: Fri Apr 01, 2011 11:03 am
by Jonah Bron
Optimally, you'd use mod_rewrite to make them all appear to be directories. So just

http://example.com/topics/

That's more intuitive. Plus, no file extensions.