I have an scalable app in openshift and I'm having problems trying to access the PHP $_SERVER
variables.
I am just trying to do "$domain = str_replace("www.", "", $_SERVER['HTTP_HOST']);
" but got the error
undefined index HTTP_HOST
, this works fine in a normal app, but not in the scalable one.
My app have two main folders "frontend" and "backend" and I redirect all the data from the root folder to "frontend" with .htaccess
:
RewriteRule ^$ frontend/ [L]
RewriteRule (.*) frontend/$1 [L]
Does anyone know how can I solve this error? Thanks
UPDATE: Just figured out that openshift has a bot that check the health of the application every two or three seconds, those access from the bot were causing the errors.