RewriteEngine on RewriteBase / ## www-Redirection #RewriteCond %{HTTP_HOST} !^max-mehl\.com$ #RewriteRule ^(.*)$ https://max-mehl.com/$1 [L,R=301] #RewriteCond %{HTTP_HOST} !^mehl\.mx$ #RewriteRule ^(.*)$ http://mehl.mx/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^(.*)\.mehl\.mx$ [NC] RewriteRule ^(.*)$ http://mehl.mx/$1 [L,R=301] ## Alias Domain RewriteCond %{HTTP_HOST} max-mehl.com$ [NC] RewriteRule ^(.*) http://mehl.mx/$1 [R=301,L] ## Nice URLs # Rewrite URL/de to URL/index.de.php RewriteRule ^(..)/?$ /index.$1.php # Rewrite URL/en/contact to URL/contact.en.php RewriteRule ^(..)/(.*)$ /$2.$1.php # Rewrite empty URL to standard index page RewriteRule ^$ index.de.php # Rewrite URL/contact to URL/contact.de.php RewriteRule ^([a-z]+)/?$ /$1.de.php ## Error Documents ErrorDocument 403 /404.php ErrorDocument 404 /404.php # Old redirections Redirect 301 /blog http://blog.max-mehl.com/ Redirect 301 /it-services http://it.mehl.mx ## SSL # HTTPS-Verschluesselung erzwingen # RewriteCond %{SERVER_PORT} !^443$ # RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} # Compression AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript # Caching # A = access ExpiresActive On ExpiresDefault A300 ExpiresByType text/html A300 ExpiresByType text/plain A300 ExpiresByType application/x-javascript A3600 ExpiresByType text/css A604800 ExpiresByType image/gif A604800 ExpiresByType image/png A604800 ExpiresByType image/jpeg A604800 ExpiresByType application/x-shockwave-flash A604800 ExpiresByType video/x-flv A604800 ExpiresByType application/pdf A604800 ExpiresByType application/x-httpd-php A604800 ExpiresByType image/x-icon A2592000