Allow access in htaccess based on the HTTP:X-FORWARDED-FOR
问题 Hi i should only allow the particular ip address(which is HTTP:X-FORWARDED-FOR adresses) to access the files. I have done it by the following Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP:X-FORWARDED-FOR} !^xxx.xxx.x.xx$ RewriteRule ^$ http://xxx.xxx.x.xx/access_denie.php [R=301,L] Now i have to allow it for multiple ip for example yyy.yy.y.yy. How can i do it by using htaccess 回答1: The ^xxx.xxx.x.xx$ portion of your RewriteCond is simply a regular expression. You