TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   MVC and mod_rewrite (http://www.talkphp.com/absolute-beginners/5363-mvc-mod_rewrite.html)

xgamer 03-21-2010 09:21 PM

MVC and mod_rewrite
 
Hello !

now i billd my web site and use MVC.
my URL is:
http://domein.com/Staticpage/View/id/35
how to change them: http://domein.com/Staticpage/View/ID/SEO or Title

SEO - is field in the DB is pre-filled with certain items
like: SEO is: title-my-content

OR
http://domein.com/Controller/Title/id
*!*
I apologize for bad English

khr2003 03-29-2010 03:06 PM

it depends on how you get your urls, if your original url looks like this:
www.ssss.com/page.php?id=$id

you can another parameter such as title and retrieve its value from the database, like:
www.ssss.com/page.php?id=$id&title=$title

then when you rewrite your urls you can include your title,
www.ssss.com/page/title/id

or whatever you like


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

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