Options -Indexes RewriteEngine on # if your app is in a subfolder # RewriteBase /my_app/ # test string is a valid files RewriteCond %{SCRIPT_FILENAME} !-f # test string is a valid directory RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php?uri=/$1 [NC,L,QSA] # with QSA flag (query string append), # forces the rewrite engine to append a query string part of the # substitution string to the existing string, instead of replacing it. # Allow to see a /.html file without having a Forbidden due to Apache conf Satisfy Any Allow from all