bambinou1980 Posted August 31, 2015 Share Posted August 31, 2015 (edited) Hello, I have an htaccess file like this: <Limit GET POST> order allow,deny allow from xxx.xxx.xxx.xx </Limit> Options +FollowSymLinks IndexIgnore */* RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] <Files 403.shtml> order deny,allow deny from all </Files> allow from xxx.xxx.xxx.xx #Fred allow from xxx.xxx.xxx.xxx #Ben What I would like to do is now let one url pass through the ip protection, I wish to have this(or more) url public. http://mysite.com/here_it-is.php How to do this please? Thank you, Ben Edited August 31, 2015 by Ch0cu3r Quote Link to comment https://forums.phpfreaks.com/topic/297995-how-to-et-1-or-more-url-through-my-htaccess-allowdisallow-ip/ Share on other sites More sharing options...
Ch0cu3r Posted August 31, 2015 Share Posted August 31, 2015 If you only want certain ip addresses from accessing a certain file then you need to define the allow from directive inside a <Files></Files> block <Files "filename-here-to-be-ip-protected.extension"> Order deny,allow Deny from all allow from xxx.xxx.xxx.xx #Fred allow from xxx.xxx.xxx.xxx #Ben </Files> Replace filename-here-to-be-ip-protected.extension with the file you want ip protected. Quote Link to comment https://forums.phpfreaks.com/topic/297995-how-to-et-1-or-more-url-through-my-htaccess-allowdisallow-ip/#findComment-1519985 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.