Bespoke PHP SEO Code
February 1, 2009 Category: Web Databases, Web Programming
If you want to achieve SEF (search engine friendly) URLs bespoke in PHP Code, then this is the article for you.
Essentially what you aim to do is write a .httaccess file that redirects parameters/arguments to functions/pages named differently to what the browser sees.
ncoded.com/about whereas in reality you go to ncoded.com/index.php?page=about
To be honest just having 1 parameter is fairly easy, where it needs a redesign slightly, including thinking about if you treat ncoded.com/ differently to ncoded.com/index.php (etc), is when you have multiple parameters or folders.
ncoded.com/internet/ide/dreamweaver/cs3
which equates to:
ncoded.com/index.xyz?a=internet;b=ide;c=dreamweaver;d=cs3
You can see some early code at this beta test site: www.idmag.biz
We intend to expand this article out with full design (UML etc) and code (PHP5), perhaps we will even wrap it up in classes (eg an Engine).