dragosdydy
Junior Member
- Jan 23, 2012
- 116
- 50
Hi guys. I have www.domain.com. On the same host i have www.mom.com and www.dad.com.
My main domain is www.domain.com and the folder is /public_html and the others are /mom and /dad inside /public_html.
The /mom and /dad folder are accessible from www.domain.com/mom and www.domain.com/dad .
How can i block the user or search engines to access www.domain.com/mom and www.domain.com/dad and only let the directories to be accessed from www.mom.com and www.dad.com .
Until now i used the following htaccess code that redirected the user to the domain in both mom and dad folders:
But i want some code to block the access and not be redirect, just an error page or a not found page. Thanks.
My main domain is www.domain.com and the folder is /public_html and the others are /mom and /dad inside /public_html.
The /mom and /dad folder are accessible from www.domain.com/mom and www.domain.com/dad .
How can i block the user or search engines to access www.domain.com/mom and www.domain.com/dad and only let the directories to be accessed from www.mom.com and www.dad.com .
Until now i used the following htaccess code that redirected the user to the domain in both mom and dad folders:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mom.com$
RewriteRule ^(.*)$ http://www.mom.com/$1 [R=301]
But i want some code to block the access and not be redirect, just an error page or a not found page. Thanks.