Advertisement
Guest User

Untitled

a guest
Mar 28th, 2021
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. # BEGIN LSCACHE
  2. # END LSCACHE
  3. # BEGIN NON_LSCACHE
  4. # END NON_LSCACHE
  5.  
  6. ## Base Redirects ##
  7.  
  8. # Turn on Rewrite Engine
  9. RewriteEngine On
  10.  
  11. # Include trailing slash on non-filepath urls
  12. RewriteCond %{REQUEST_URI} !(.+)/$
  13. RewriteCond %{REQUEST_FILENAME} !-d
  14. RewriteCond %{REQUEST_FILENAME} !-f
  15. RewriteRule (.*)$ https://cyberspacehawk.com/$1/ [R=301,L]
  16.  
  17. # Include trailing slash on non-filepath URLs with query string
  18. RewriteCond %{REQUEST_FILENAME} !-f
  19. RewriteCond %{REQUEST_URI} !(.+)/$
  20. RewriteCond %{QUERY_STRING} (.+)
  21. RewriteRule ^ https://cyberspacehawk.com/%1/%2 [R=301,L]
  22.  
  23. # Include trailing slash on non-filepath URLs with fragment
  24. RewriteCond %{REQUEST_FILENAME} !-f
  25. RewriteCond %{REQUEST_URI} !(.+)/$
  26. RewriteRule ^(.+)\#(.+)$ https://cyberspacehawk.com/$1/#$2 [R=301,L]
  27.  
  28. # Include trailing slash on directory
  29. RewriteCond %{REQUEST_URI} !(.+)/$
  30. RewriteCond %{REQUEST_FILENAME} -d
  31. RewriteRule ^(.+)$ https://cyberspacehawk.com/$1/ [R=301,L]
  32.  
  33. # Force HTTPS and remove WWW
  34. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [OR,NC]
  35. RewriteCond %{HTTPS} off
  36. RewriteRule ^(.*)$ https://cyberspacehawk.com/$1 [R=301,L]
  37. # AMPFORWPLBROWSERCSTART Browser Caching
  38. <IfModule mod_expires.c>
  39. ExpiresActive On
  40. AddType application/vnd.ms-fontobject .eot
  41. AddType application/x-font-ttf .ttf
  42. AddType application/x-font-opentype .otf
  43. AddType application/x-font-woff .woff
  44. AddType image/svg+xml .svg
  45. ExpiresByType application/vnd.ms-fontobject "access 1 year"
  46. ExpiresByType application/x-font-ttf "access 1 year"
  47. ExpiresByType application/x-font-opentype "access 1 year"
  48. ExpiresByType application/x-font-woff "access 1 year"
  49. ExpiresByType image/svg+xml "access 1 year"
  50. ExpiresByType image/webp "access 1 year"
  51. ExpiresByType image/gif "access 1 year"
  52. ExpiresByType image/jpg "access 1 year"
  53. ExpiresByType image/jpeg "access 1 year"
  54. ExpiresByType image/png "access 1 year"
  55. ExpiresByType image/x-icon "access 1 year"
  56. ExpiresByType text/css "access 3 month"
  57. ExpiresByType text/javascript "access 3 month"
  58. ExpiresByType application/javascript "access 3 month"
  59. ExpiresByType application/x-javascript "access 3 month"
  60. ExpiresByType application/xhtml-xml "access 3 month"
  61. ExpiresByType application/pdf "access 3 month"
  62. ExpiresByType application/x-shockwave-flash "access 3 month"
  63. </IfModule>
  64. # END Caching AMPFORWPLBROWSERCEND
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement