TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Everything by URL's or by separate .php files (http://www.talkphp.com/general/2149-everything-urls-separate-php-files.html)

Orc 01-31-2008 02:29 AM

Everything by URL's or by separate .php files
 
I am wanting to know which would be a better way of handling things
URL vars, as say if you made a CMS, and you wanted to add news you'd have a URL as such:
http://www.example.com/admin/?act=addnews&id=1

Or shall I go with doing this:
http://www.example.com/admin/news.php?act=add
or
http://www.example.com/admin/news.php?act=del&id=1

:S??

sarmenhb 01-31-2008 02:51 AM

Quote:

Originally Posted by Orc (Post 10005)
I am wanting to know which would be a better way of handling things
URL vars, as say if you made a CMS, and you wanted to add news you'd have a URL as such:
http://www.example.com/admin/?act=addnews&id=1

Or shall I go with doing this:
http://www.example.com/admin/news.php?act=add
or
http://www.example.com/admin/news.php?act=del&id=1

:S??

how about www.example.com/admin/news setup a rule in htaccess so the page can be found by search engines

Orc 01-31-2008 02:54 AM

Quote:

Originally Posted by sarmenhb (Post 10006)
how about www.example.com/admin/news setup a rule in htaccess so the page can be found by search engines

Not yet, I'm a noobie at MySQL, so this is a bit tough for me. :S

Village Idiot 01-31-2008 02:58 AM

Best to separate the files, makes for easier to manage and read code.

Orc 01-31-2008 03:05 AM

Quote:

Originally Posted by Village Idiot (Post 10008)
Best to separate the files, makes for easier to manage and read code.

Yeah, sounds better.. :]

maZtah 01-31-2008 01:23 PM

Quote:

Originally Posted by sarmenhb (Post 10006)
how about www.example.com/admin/news setup a rule in htaccess so the page can be found by search engines

There's no need to make the CMS SEO-friendly. Likely you don't want Google into your CMS, right? So you should not waste time on that. Just keep it simple with different files to keep it well organized.


All times are GMT. The time now is 09:57 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0