Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RewriteEngine On
- # Rewrite to html cache if it exists and the request is off a static page (no url query params and only get requests)
- RewriteCond %{REQUEST_METHOD} GET
- RewriteCond %{QUERY_STRING} !.*=.*
- RewriteCond %{DOCUMENT_ROOT}/cache/static%{REQUEST_URI}.html -f
- RewriteRule ^(.*)$ /cache/static%{REQUEST_URI}.html [L]
- # This is specific to cache the index when it' accesed vie /
- RewriteCond %{REQUEST_METHOD} GET
- RewriteCond %{QUERY_STRING} !.*=.*
- RewriteCond %{DOCUMENT_ROOT}/cache/static/index.html -f
- RewriteCond %{REQUEST_URI} ^/$
- RewriteRule .* /cache/static/index.html [L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement