Skip to content

Instantly share code, notes, and snippets.

@kosinix
Last active November 19, 2021 02:04
Show Gist options
  • Save kosinix/8267252 to your computer and use it in GitHub Desktop.
Save kosinix/8267252 to your computer and use it in GitHub Desktop.
Prevent Access to Subdomain Folder from Main Domain. Note: Place this in your sub domain's .htaccess file (public_html/subdomain). Change subdomain to actual sub-domain and mysite.com to your main domain.
RedirectMatch ^/subdomain/(.*)$ http://subdomain.mysite.com/$1
@milhami
Copy link

milhami commented Jun 11, 2020

It works for me, in cpanel.

Copy link

ghost commented Nov 19, 2021

thx random ppl on the internet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment