RewriteEngine On # If the request is not for a valid directory RewriteCond %{REQUEST_FILENAME} !-d # If the request is not for a valid file RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/$ PHP/home.php?page=$1 [L,QSA]