Prevent browsing to sub domain
-
Hello all. Ive searched everywhere for a way to do this but every time I add a block of text to the htaccess file I get a 500 error.
I have a primary domain as example:
mydomain.co.uk
and I want to prevent a user browsing to 2 sub domains
mydomain.co.uk/subdomaina
mydomain.co.uk/subdomainbHeres my htaccess file:
rewriteengine on # BEGIN WordPress <IfModule mod_rewrite.c> RewriteBase / </IfModule> # END WordPress rewriterule ^index\.php$ - [L] rewritecond %{REQUEST_FILENAME} !-f rewritecond %{REQUEST_FILENAME} !-d rewriterule . /index.php [L] rewriterule ^index\.php$ - [L] rewritecond %{REQUEST_FILENAME} !-f rewritecond %{REQUEST_FILENAME} !-d rewriterule . /index.php [L]
How would I add allow/deny or rewrite conditions to the above to prevent loading the 2 sub domains?
Thanks for any help you can offer ??
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Prevent browsing to sub domain’ is closed to new replies.