Need make redirect from http://sitename.com/cat/index.php to http://sitename.com/cat/index.php#anchor
I tried 2 ways: php redirect and meta refresh
PHP redirect
<?php
$URL = "http://sitename.com/cat/index.php#anchor";
header("Location: $URL");
?>
<html>
....
meta refresh
<html>
<head>
...
<meta http-equiv="refresh" content="0;url=http://sitename.ru/cat/index.php#anchor">
...
</head>
...
</html>
In result to both ways I have cycling page refresh.
How to correctly solve this problem ?