Forum Moderators: phranque
Options -Indexes
ServerSignature Off
Redirect 301 /old-page /new-page
RewriteEngine On
SetOutputFilter DEFLATE
#SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|swf|mp4|exe|zip|wav|)$ no-gzip dont-vary
RewriteRule ^(html5|index\.php|editor) - [L]
RewriteRule ^.*\.(css|txt)$ - [L]
#RewriteRule ^.*\.(css)$ - [L]
RewriteRule ^(([a-z0-9\-]+/)*[a-z0-9\-]+)$ http://www.example.com/$1/ [R=301,L]
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$ [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?t=$1 [L,QSA] Additional path information beyond the matched URL-path will be appended to the target URL.
...
This includes requests with GET parameters, ...
Modifying the Query String
By default, the query string is passed through unchanged. You can, however, create URLs in the substitution string containing a query string part. Simply use a question mark inside the substitution string to indicate that the following text should be re-injected into the query string. When you want to erase an existing query string, end the substitution string with just a question mark. To combine new and old query strings, use the [QSA] flag.