http - Convert path queries to url variables with .htaccess? -


i want convert entity query 'http://www.mysite.com/users' 'http://www.mysite.com/entities.php?entityname=users'.

how make such rewrite rule? or should put .htaccess?

would great preserve original url variables, convert 'http://www.mysite.com/users?fields=id,uuid' 'http://www.mysite.com/entities.php?entityname=users&fields=id,uuid'.

if want rewrite (and not redirect) /$users /entities.php?entityname=$users while preserving original query string, rewrite /$users?fields=id,uuid /entities.php?entityname=$users&fields=id,uuid try this:

rewriteengine on  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^([a-za-z0-9_-]+)/?$ /entities.php?entityname=$1 [qsa] 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -