Skip to content

Instantly share code, notes, and snippets.

@j26design
Last active November 2, 2018 04:11
Show Gist options
  • Save j26design/4b224c48fd489675654f to your computer and use it in GitHub Desktop.
Save j26design/4b224c48fd489675654f to your computer and use it in GitHub Desktop.
Redirect subdomain to subfolder
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain\.example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.subdomain\.example\.com$
RewriteRule ^/?$ "http\:\/\/www\.example\.com\/subdomain\/" [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment