How can I solve my redirection issues?

Discussion in 'HTML & Website Design' started by chandanpuri, Feb 8, 2014.

  1. #1
    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.
     
    chandanpuri, Feb 8, 2014 IP
  2. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    35
    Best Answers:
    7
    Trophy Points:
    173
    #2
    Do you mean your website gets auto refreshed ? Have you set the redirect using .htaccess ?
     
    MilesWeb, Feb 8, 2014 IP
  3. chandanpuri

    chandanpuri Member

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    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.
     
    chandanpuri, Feb 8, 2014 IP
  4. bogi

    bogi Well-Known Member

    Messages:
    482
    Likes Received:
    16
    Best Answers:
    2
    Trophy Points:
    140
    #4
    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.
     
    bogi, Feb 8, 2014 IP
  5. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #5
    Looks like redirect goes into an infinite redirect loop. Post your full code here for more help.
     
    nimonogi, Feb 9, 2014 IP
  6. bogi

    bogi Well-Known Member

    Messages:
    482
    Likes Received:
    16
    Best Answers:
    2
    Trophy Points:
    140
    #6
    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.
     
    bogi, Feb 9, 2014 IP
  7. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #7
    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):
     
    nimonogi, Feb 9, 2014 IP
  8. AlbCoder

    AlbCoder Well-Known Member

    Messages:
    126
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    163
    #8
    I don't see any auto refresh on your site its running normal
     
    AlbCoder, Feb 9, 2014 IP
  9. bogi

    bogi Well-Known Member

    Messages:
    482
    Likes Received:
    16
    Best Answers:
    2
    Trophy Points:
    140
    #9
    Yes, the site doesn't contain the meta refresh anymore :)
     
    bogi, Feb 9, 2014 IP