When creating link or a plain a tag html link such as href="/?q=user/login" inside a block or node with PhpFilter is causing the entire site to an infinite redirect loop to http://localhost/?q=user.
At first it will will start from 5 redirects and the page load, then it will double, triple upto infinite that the browser will complain the the request redirect will not finish.
This occurs on any request being on the home page or admin page is returning an infinite loop.
Sample code in the block:
<?php
if(user_is_logged_in()){
global $user;
print "Welcome ".$user->name.' | <a href="/?q=user">My Account</a> | <a href="/?q=user/logout">Log out</a>';
}else{
?>
<?php
}
?>
Response sample:
Content-Language: en
X-Generator: Drupal 7 (http://drupal.org)
Link: ; rel="canonical",; rel="shortlink"
Location: http://localhost/?q=user
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked