I used 301 code for redirection on my site http://www.vishiphotography.com/ But after using it my site is continuously running in refresh mode. How can I solve my this problem ? What code should I use instead of this? <meta http-equiv="refresh" content="0; url=http://www.vishiphotography.com"> Help me out please.
Hi MilesGeek, Thanks for the reply. Yes my website is getting auto refresh after using this code <meta http-equiv="refresh" content="0; url=http://www.vishiphotography.com"> And I didn't set the redirect using .htaccess. But I used html code in header file.
Of course it refreshes the site because that's what the above mentioned meta tag does. You redirect your homepage to itself; so every time it loads it's refreshed. It would be great to know what to you want to redirect and where.
As you can see he already posted his code in the first post. We can't really help him without knowing what he'd like to redirect and where.
In case that this is the full code, a session check will solve the problem: <? session_start(); // if the user has no valid session if ( !isset($_SESSION['id']) ) { // set session // redirect } ?> Code (markup):