Skip to content

Instantly share code, notes, and snippets.

@natanfelles
Created November 25, 2017 02:09
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 natanfelles/9bdf6ad2ec797d066b338d315d101f42 to your computer and use it in GitHub Desktop.
Save natanfelles/9bdf6ad2ec797d066b338d315d101f42 to your computer and use it in GitHub Desktop.
Apache .htaccess - Use child folder as document root
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.tld$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.domain.tld$
RewriteCond %{REQUEST_URI} !public/
RewriteRule (.*) /public/$1 [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment