My aim is to redirect the following pages from/to:
/ -> /util/master.php?view=home # default site
/contact -> /util/master.php?view=contact # site
/contact?a=1&b=2 -> /util/master.php?view=contact&a=1&b=2 # site with params
/res/style.css -> /res/style.css # don't redirect files
My current rewrite script is as follows, but it will always give me an error 500.
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f # not a file
RewriteRule ^(.*)$ util/master.php?view=$1&%{QUERY_STRING} [NC,L]
(as seen here)
edit: also, it should be able to work with "sub pages":
/contact/form?a=1&b=2 -> /util/master.php?view=contact/form&a=1&b=2 # sub page with params