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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -