Flat vs. Nested Site

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
lawebsite
Forum Newbie
Posts: 1
Joined: Fri Apr 01, 2011 6:46 am

Flat vs. Nested Site

Post 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.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Flat vs. Nested Site

Post 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.
Post Reply