Reputation: 28464
I have a subdomain for my website created in cPanel and I've noticed that in addition to being able to access the content through this URL:
subdomain.example.com
It can also be accessed via:
example.com/subdomain
Questions:
Upvotes: 3
Views: 1319
Reputation: 121
There's nothing wrong with it as long as either you don't send users to the directory, or the applications and pages in that directory can handle using two different URLs (e.g. it uses only relative URLs).
If you want to block the directory, then try this htaccess directive:
RewriteRule ^subdomain/ - [L,R=404]
Upvotes: 4