ballhogjoni Posted September 30, 2008 Share Posted September 30, 2008 How can you make htaccess run a file? I have a php file that checks the visitors ip address and if they are not from the correct country they can't view my site. I want to run this file before any other file is ever ran on my server. Link to comment https://forums.phpfreaks.com/topic/126480-solved-make-htaccess-run-a-file/ Share on other sites More sharing options...
Daniel0 Posted September 30, 2008 Share Posted September 30, 2008 That question doesn't make sense. I don't even know where to move it. ??? Link to comment https://forums.phpfreaks.com/topic/126480-solved-make-htaccess-run-a-file/#findComment-654099 Share on other sites More sharing options...
DarkWater Posted September 30, 2008 Share Posted September 30, 2008 That question doesn't make sense. I don't even know where to move it. ??? That's why they made Magic 8 Balls. Durr. Link to comment https://forums.phpfreaks.com/topic/126480-solved-make-htaccess-run-a-file/#findComment-654102 Share on other sites More sharing options...
The Little Guy Posted September 30, 2008 Share Posted September 30, 2008 Options +FollowSymlinks RewriteEngine On RewriteRule (.+?) run/with/this.php Link to comment https://forums.phpfreaks.com/topic/126480-solved-make-htaccess-run-a-file/#findComment-654312 Share on other sites More sharing options...
DarkWater Posted September 30, 2008 Share Posted September 30, 2008 Options +FollowSymlinks RewriteEngine On RewriteRule (.+?) run/with/this.php He wants to use like, a true/false value from a PHP script to see if they can get sent off to the page. >_< Link to comment https://forums.phpfreaks.com/topic/126480-solved-make-htaccess-run-a-file/#findComment-654318 Share on other sites More sharing options...
xtopolis Posted October 1, 2008 Share Posted October 1, 2008 OP knows that IPs can be fake/proxies, right? Link to comment https://forums.phpfreaks.com/topic/126480-solved-make-htaccess-run-a-file/#findComment-654382 Share on other sites More sharing options...
CroNiX Posted October 1, 2008 Share Posted October 1, 2008 Why not have your php file which detects your criteria just included at the top of every page on your site? Have it redirect to google or something... Link to comment https://forums.phpfreaks.com/topic/126480-solved-make-htaccess-run-a-file/#findComment-654456 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.