Jump to content

$_SERVER is it right?


cooldude832

Recommended Posts

I'm trying to isolate a script so it only runs if you are on the right IP via .htaccess (I know I can do it in php but this is how I want to do it)

 

So I checked $_SERVER for that system's IP put it in my .htaccess like so

RewriteCond ${REMOTE_ADDR} !=99.9.184.79
RewriteRule ^cron\.php$ index.php?Page_Request=index&request=1 [QSA,L]

 

And no work that IP gets rewritten when it should go through right?

 

So does $_SERVER['REMOTE_ADDR'] == .htacces{REMOTE_ADDR} ???

Link to comment
https://forums.phpfreaks.com/topic/123716-_server-is-it-right/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.