anups Posted December 3, 2010 Share Posted December 3, 2010 I have htaccess file from which I am calling htpasswd. Currently its ask for authentication from everyone. I want it IP based or Domain based so that a user requesting from specific IP may not have to go through http authentication. Some domain calling the web pages in background like paypal OR google checkout can access the page without http authentication. Is it possible ? content of htaccess file is given below. AuthUserFile /var/www/web/.htpasswd AuthName "Authorization Required" AuthType Basic <Limit GET POST> require user username </Limit> Link to comment https://forums.phpfreaks.com/topic/220540-htpasswd-based-on-referer/ Share on other sites More sharing options...
OldWest Posted December 3, 2010 Share Posted December 3, 2010 if i understand what you are trying to do correct, php has several function shat can get the ip address like $_SERVER['REMOTE_ADDR']; .. and you can just bypass the login credentials and start your session for the user with their ip address as the credentials... hope this helps Link to comment https://forums.phpfreaks.com/topic/220540-htpasswd-based-on-referer/#findComment-1142533 Share on other sites More sharing options...
anups Posted December 3, 2010 Author Share Posted December 3, 2010 I have to check rerefer and bypass some IP or host in .htaccess file not in PHP Link to comment https://forums.phpfreaks.com/topic/220540-htpasswd-based-on-referer/#findComment-1142541 Share on other sites More sharing options...
OldWest Posted December 3, 2010 Share Posted December 3, 2010 I have to check rerefer and bypass some IP or host in .htaccess file not in PHP Why do you need to do it this way? Just curious? Link to comment https://forums.phpfreaks.com/topic/220540-htpasswd-based-on-referer/#findComment-1142542 Share on other sites More sharing options...
laffin Posted December 3, 2010 Share Posted December 3, 2010 htaccess is controlled by apache not php. so either, implement a system with apache authentication/bypassing or use php for authentication/bypassiing Link to comment https://forums.phpfreaks.com/topic/220540-htpasswd-based-on-referer/#findComment-1142565 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.