Using Basic Authentication (htaccess) to restrict access to a specific URL
问题 I need to restrict access to a particular URL, e.g. http://mydomain.com/this/is/the/url on my webserver using Basic Authentication through Apache. Any other URL should be openly accessible. I have seen that you can add specific rules to files using: <Files "mypage.html"> Require valid-user </Files> My problem is that all requests are routed to controllers using mod-rewrite and so I don't think that I can restrict access based on the file. Any ideas would be most helpful! 回答1: In .htacess file