Skip to content

Instantly share code, notes, and snippets.

@styledev
Created June 11, 2024 22:54
Show Gist options
  • Save styledev/c3e65924cd55c85cd4d4b4e691cd880c to your computer and use it in GitHub Desktop.
Save styledev/c3e65924cd55c85cd4d4b4e691cd880c to your computer and use it in GitHub Desktop.
.htaccess load remote resources if not found locally
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) https://domainname.com/$1 [QSA,L,C]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment