Hi Tristan,
they need to be inside each virtual host.
I am posting some and would appreciate any help. I'm lost. I have Apache 2 and have no SSL (other than accessing Cpanel)
Code:
RewriteEngine on
RewriteRule ^(.+)-word$ /$1.php [L]
RewriteEngine on
RewriteRule ^go-out/(.*)$ /go-out.php?id=$1
RedirectPermanent /test http://www.my-site.com
<Directory /home/mydir/www/subdir>
php_value output_handler none
php_flag register_globals off
php_flag safe_mode off
</Directory>
RewriteRule ^about/$ about.php
RewriteCond %{QUERY_STRING} ^test$ [OR]
RewriteCond %{QUERY_STRING} ^test1$
RewriteRule ^$ http://www.mysite.com/? [R=301,L]
RewriteCond %{HTTP_USER_AGENT} Zeus [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^GarlikCrawler/1\.1 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^GarlikCrawler/\.1\.1 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Spinn3r [NC,OR]
RewriteRule .* - [F,L]
<Limit GET PUT POST>
Order Allow,Deny
Allow from all
Deny from env=spammer
Deny from 58.61 #soso
Deny from 61.135 #TencentTraveler
</Limit>
<Directory /home/mydir/www>
Options SymLinksIfOwnerMatch +IncludesNOEXEC +ExecCGI
AllowOverride AuthConfig
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>
</Directory>
<Directory "/home/mydir/www">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType text/css A691200
ExpiresByType application/javascript A691200
ExpiresByType application/x-javascript A691200
ExpiresByType text/javascript A691200
ExpiresByType image/x-icon A2592000
</Directory>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Googlebot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Msnbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Slurp [NC]
RewriteCond %{THE_REQUEST} \.php
RewriteRule \.php - [F]
RewriteCond %{QUERY_STRING} utm_source=twitterfeed&utm_medium=twitter
RewriteRule (.*) http://www.mysite.com$1? [R=301,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php?\ HTTP/ [NC]
RewriteRule ^(.*)index.php?$ http://www.mysite.com$1 [R=301,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html?\ HTTP/ [NC]
RewriteRule ^(.*)index.html?$ http://www.mysite.com$1 [R=301,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.htm?\ HTTP/ [NC]
RewriteRule ^(.*)index.htm?$ http://www.mysite.com$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^[0-9]+(\.[0-9]+){3} [OR]
RewriteCond %{HTTP_HOST} ^mysite\.com
RewriteRule ^(.*)$ http://www.mysite.com$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^mail.mysite\.com
RewriteRule ^(.*)$ http://www.mysite.com$1 [R=301,L]