RewriteEngine On RewriteCond %{REQUEST_URI} !^/?index.php$ [NC] RewriteCond %{REQUEST_URI} .php$ [NC] RewriteRule ^ / [R,L]