php - Mod_Rewrite .Htaccess -


i have problem not find during online search.

i have made wildcard sub-domain , sub domain main domain points folder.

i looking create link uri parameters like

1- .domain.com/location/locationname 2- .domain.com//location.php? locname=

and

1- .domain.com/location/locationname/category/categoryname/item/itemname 2- .domain.com//orderitem.php?locname=locationname&ordercategory=categoryname&orderitem=itemname

(2) happening in backend , user still sees (1)

how work? have make table in mysql, not sure how go around. second explode url , link specific url orderloc or ordermenu or orderitem etc.

any step closer.

thanks

this should work:

rewriteengine on rewriterule ^location/(.*)/category/(.*)/item/(.*) //orderitem.php?locname=$1&ordercategory=$2&orderitem=$3\? [l] rewriterule ^location/(.*) //location.php?locname=\? [l] 

it show domain.com/location/locationname user, backend see `domain.com//location.php?locname=

and domain.com/location/locationname/category/categoryname/item/itemname user, backend see domain.com//orderitem.php?locname=locationname&ordercategory=categoryname&orderitem=itemname


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -