.htaccess - How to make htacces pattern like that -


how can implement pattern in htacces. main file dashboard.php. 1 variable constant , optional. that's idea:

from:

dashboard.php?view=foo&var1=bar&var2=something....... 

to:

dashboard/foo?var1=bar&var2=something..... 

i'm not @ writing conditions .htacces. can me this? thanks!

you can use rule in site root .htaccess:

optiona -multiviews rewriteengine on  rewriterule ^(dashboard)/([\w-]+)/?$ $1.php?view=$2 [l,qsa,nc] 

references:


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -