php - how to convert in url " _" to "-" using htaccess? -


i have url looks like:

url.com/rom_date/ct_8/first_0 

how go converting url to

url.com/rom-date/ct-8/first-0 

how go making friendly urls in php?

with htaccess can change first link second :

#put me in global htaccess file  rewriteengine on rewriterule ^([^_/]+)_([^_/]+)/([^_/]+)_([^_/]+)/([^_/]+)_([^_/]+)/?$ /$1-$2/$3-$4/$5-$6 [l,nc] 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - How can I echo out this array? -

javascript - IE11 incompatibility with jQuery's 'readonly'? -