Friday 15 January 2010

PHP how to make URL as per opened category (Like Stackoverflow) -



PHP how to make URL as per opened category (Like Stackoverflow) -

i want create url stackoverflow. when open profile or topic url becomes like: http://stackoverflow.com/myprofile

so want when user open category url stackoverflow , books of same category open.

i have lot of categories in sql table like: * books * magazines * business * economic scheme * health * history * humor

how can please help.

you'll need share info urls in question, however, here illustration http://zenverse.net/seo-friendly-urls-with-htaccess/. rewrite rule go in .htaccess file.

rewriterule ^topic/([a-za-z0-9]+)/$ index.php?topic=$1

so url index.php/topic=something.

the ([a-za-z0-9]+) correlates $1. regex look letters , numbers. means topic/something map index.php?topic=something.

in case $1 category names/ids.

php url

No comments:

Post a Comment