Apache Webserver Snippets

Deny all methods excepting POST and GET RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD) RewriteRule .* - [F] Rewrite all aliases for a domain to a single domain RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?mydomain1\.com [NC,OR] RewriteCond %{HTTP_HOST} ^(www\.)?mydomain2\.com [NC,OR] RewriteCond %{HTTP_HOST} ^(www\.)?mydomain3\.com [NC,OR] RewriteRule (.*) http://mydomain.com/$1 [R=301,L]

March 1, 2010 · 1 min · 42 words · Micha Kops