Skip to content

Instantly share code, notes, and snippets.

@twentyfortysix
Last active January 16, 2023 16:18
Show Gist options
  • Save twentyfortysix/7ea7ff14f28db32e7d09cd6c1bc7de9a to your computer and use it in GitHub Desktop.
Save twentyfortysix/7ea7ff14f28db32e7d09cd6c1bc7de9a to your computer and use it in GitHub Desktop.
manual web root to bedrock.sh
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.rocks$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.domain.rocks$
RewriteCond %{REQUEST_URI} !bedrock/web/
RewriteRule (.*) /bedrock/web/$1 [L]
# or
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.rocks$
RewriteCond %{REQUEST_URI} !^/domain.rocks/bedrock/web/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /domain.rocks/bedrock/web/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.rocks$
RewriteRule ^(/)?$ domain.rocks/bedrock/web/index.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment