Rewrite rules for blocking URL access
I have two sites,
www.example.com and offers.example.com
Now i want the site - offers.example.com to be accessed only through www.example.com
i.e., I dont want to give public access to offers.example.com开发者_运维知识库...
Can i achieve this through rewrite rules?
or do i have to do this through PHP code?
Please suggest?
you can not do that with php code as the second page viewed will not have the www. referer
you will need to build some sort of authentication with php or use .htpasswd and only allow users with logins to go there.
http://httpd.apache.org/docs/2.0/programs/htpasswd.html
http://php.net/manual/en/features.http-auth.php
精彩评论