RewriteEngine On RewriteBase /tcms RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^index\.php #RewriteCond %{QUERY_STRING} ^$ RewriteRule ^(.*?)(\?.*)?$ index.php?$1 [L] #RewriteCond %{QUERY_STRING} !^$ #Redirect ^(.*?)(\?.*)?$ $1