I have this huge issue that I have no idea how to fix. I have a script that redirects to a url.
So far I have:
//do some mysql
$geo_included = true; //trying to fix infinite redirect loop.
if($geo_included === true){
header('Location: '.$url["url"]); //this is causing the issue with redirect loop
}
$url["url"] for example is: www.google.com
But when I go to that PHP file it will redirect to:
www.sitename.com/www.google.com
and say there is an infinite redirect loop. Note: the above header location script is not in a while/for/foreach loop.
Here is my .htaccess for the / directory
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?group=$1 [L]
Any ideas?