Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # BEGIN LSCACHE
- # END LSCACHE
- # BEGIN NON_LSCACHE
- # END NON_LSCACHE
- ## Base Redirects ##
- # Turn on Rewrite Engine
- RewriteEngine On
- # Include trailing slash on non-filepath urls
- RewriteCond %{REQUEST_URI} !(.+)/$
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule (.*)$ https://cyberspacehawk.com/$1/ [R=301,L]
- # Include trailing slash on non-filepath URLs with query string
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_URI} !(.+)/$
- RewriteCond %{QUERY_STRING} (.+)
- RewriteRule ^ https://cyberspacehawk.com/%1/%2 [R=301,L]
- # Include trailing slash on non-filepath URLs with fragment
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_URI} !(.+)/$
- RewriteRule ^(.+)\#(.+)$ https://cyberspacehawk.com/$1/#$2 [R=301,L]
- # Include trailing slash on directory
- RewriteCond %{REQUEST_URI} !(.+)/$
- RewriteCond %{REQUEST_FILENAME} -d
- RewriteRule ^(.+)$ https://cyberspacehawk.com/$1/ [R=301,L]
- # Force HTTPS and remove WWW
- RewriteCond %{HTTP_HOST} ^www\.(.*)$ [OR,NC]
- RewriteCond %{HTTPS} off
- RewriteRule ^(.*)$ https://cyberspacehawk.com/$1 [R=301,L]
- # AMPFORWPLBROWSERCSTART Browser Caching
- <IfModule mod_expires.c>
- ExpiresActive On
- AddType application/vnd.ms-fontobject .eot
- AddType application/x-font-ttf .ttf
- AddType application/x-font-opentype .otf
- AddType application/x-font-woff .woff
- AddType image/svg+xml .svg
- ExpiresByType application/vnd.ms-fontobject "access 1 year"
- ExpiresByType application/x-font-ttf "access 1 year"
- ExpiresByType application/x-font-opentype "access 1 year"
- ExpiresByType application/x-font-woff "access 1 year"
- ExpiresByType image/svg+xml "access 1 year"
- ExpiresByType image/webp "access 1 year"
- ExpiresByType image/gif "access 1 year"
- ExpiresByType image/jpg "access 1 year"
- ExpiresByType image/jpeg "access 1 year"
- ExpiresByType image/png "access 1 year"
- ExpiresByType image/x-icon "access 1 year"
- ExpiresByType text/css "access 3 month"
- ExpiresByType text/javascript "access 3 month"
- ExpiresByType application/javascript "access 3 month"
- ExpiresByType application/x-javascript "access 3 month"
- ExpiresByType application/xhtml-xml "access 3 month"
- ExpiresByType application/pdf "access 3 month"
- ExpiresByType application/x-shockwave-flash "access 3 month"
- </IfModule>
- # END Caching AMPFORWPLBROWSERCEND
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement