This is a discussion on Site Structure within the Coding Help forums, part of the Webmaster Help category; I'm designing a site and its my first time using the below structure, just looking for a bit of feedback ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||||
| I'm designing a site and its my first time using the below structure, just looking for a bit of feedback on it. Basically there will be one file, just the index.php then a folder called source or something. Every link on the site will have the parameter PID so a link will look like http://www.site.com/index.php?PID=news or http://www.site.com/index.php?PID=photos All that will be in the index file will be something like below: PHP Code: |
| |||||
| Before I go into 50 different things here can you answer 2 questions. 1. What is your php experience like? is that is sudo code? Can see the problems and security risks with it as is? (EDIT: did you write the code (php) for ign.ie yourself or is it all flat file too?) 2. Why are you choosing to include flat php files over doing a database lookup?
__________________ PHP Code: Last edited by Frodo; 14-02-2008 at 04:53 AM. |
| |||||
| Madness :| of a sorts .. Why the urge to do it this way ?
__________________ Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it ) Recent Work: Safari Club African Safari Holidays - Malawi Safaris Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools |
| |||||
| Quote:
No i cant see the security risks straight off hence why i'm asking for feedback before i did any coding. Wrote all the code for ign.ie myself. 2: The only info in the 'source' files would be the body layout of each page and then there would be calls to sql queries in another file for the DB. Quote:
|
| ||||
| If you were going to go this route, I would make the URLs more seo friendly. i.e. have a more descriptive term in the PID variable.
__________________ “When you want something, all the world conspires in helping you to achieve it.” www.waffle.ie waffle.ie/members/wheres me jumpa Waffle Arcade Waffle Casino Waffle Radio Waffle TV NSFW.ie wheresmejumpa.com |
| |||||
| Quote:
Just wanted to get some feedback on the up sides and down sides of this or if there was any better way to structure the site to decrease space and run time with the code. |
| |||||
| Your question doesn't make any sense to me. You want to structure the pages based on folders but you want to pass the folder name by QS in the url? Why?... when you just add the folder name like this: http://www.site.com/folder_name/ inside the folder you have your index.php file that will load as default. If you don't want to give the original folder name you can use .htaccess to rewrite the path http://www.site.com/keywords_stuffed_name/ -> http://www.site.com/folder_name/ Does that sounds more like it?
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |
| |||||
| I've attached an image on the structure im asking about. Basiclly someone will go to the index.php?PID=news and then it will call a function from the news.php file in the source folder that has the layout for the news page, the news.php page will call queries in the sql.php file to retrieve relevant data from the DB to populate the page. Get me?? |
| |||||
| I do get you but you're really going to open yourself to attacks by using this type of query: index.php?PID=news using mode rewrite is a lot safer. There is nothing wrong with this structure if it's done right. |
| |||||
| Quote:
it'll actually show up like http://www.site.com/news.htm instead of http://www.site.com/index.pgp?PID=news Also i was thinking of maybe checking the PID parameter againest a table in the DB and if it exists then it'll load the relevant page or else it'll load an error page. |
| Tags |
| site, structure |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Successful Site in 12 Months with Google Alone | montyauto | Webmaster Articles | 11 | 18-02-2008 01:28 PM |
| How to Avoid the Google Sandbox | Cormac | Webmaster Articles | 26 | 18-02-2008 05:38 AM |
| Redirecting multiple domains to one site | Orinovo | Search Engine Optimisation | 2 | 19-01-2008 09:58 PM |
| Swapping Web Links, the best way to find link exchange partners | Gman290 | Search Engine Optimisation | 5 | 28-04-2007 04:06 PM |
| ||||||||
| | ![]() | |||||||