Quote:
Originally Posted by redlabour
Can?t work because vBulletin does not use URL?s without www. for redirecting unhacked.
Was this just a question if it works or do you need this without www. ?
But of course you can ad this Line so that it works with both. With www. or without.
|
Not everyone will put
www.domain.com
Some will put domain.com or
http://www.domain.com or
http://domain.com
Where you say you can add a line so it works with both, would you do it like this?
Instead of this:
Code:
$url_info = parse_url($rightlink);
if ($url_info["host"]=="www.YOURDOMAIN.de"):
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
else:
return "<a href=\"http://www.YOURDOMAIN.de/forum/links.php?url=$rightlink\" target=\"_blank\">$text</a>";
endif;
It would be:
Code:
$url_info = parse_url($rightlink);
if ($url_info["host"]=="www.YOURDOMAIN.de") || ($url_info["host"]=="YOURDOMAIN.de") || ($url_info["host"]=="http://YOURDOMAIN.de") || ($url_info["host"]=="http://www.YOURDOMAIN.de"):
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
else:
return "<a href=\"http://www.YOURDOMAIN.de/forum/links.php?url=$rightlink\" target=\"_blank\">$text</a>";
endif;
?