Skip to content

Instantly share code, notes, and snippets.

@paulsheldrake
Last active September 28, 2022 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulsheldrake/0cbd7638a4255991d2a47026259822e3 to your computer and use it in GitHub Desktop.
Save paulsheldrake/0cbd7638a4255991d2a47026259822e3 to your computer and use it in GitHub Desktop.
Apache
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/$1 -f [OR]
RewriteCond %{DOCUMENT_ROOT}/$1 -d
RewriteRule (.*) - [L]
#
# Else proxy
RewriteRule ^/(.*)$ ##DOMAIN##/$1 [P,QSA]
ProxyPassReverse / ##DOMAIN##
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment