.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

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -