1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

htacces 301 redirect help needed

Discussion in 'Web Design' started by Claudiu, Mar 31, 2011.

  1. Claudiu

    Claudiu Regular Member

    Joined:
    Feb 28, 2009
    Messages:
    287
    Likes Received:
    81
    Location:
    127.0.0.1
    hi,

    i'm using the standard redirection which works partialy. it does redirect to the new page but in the browser it keeps the old url as if it's still on my website. i would like instead to show the new url so the user will go next time directly to the new page and not the old one.

    any way to do this while keeping the 301 redirect active ?


    here is my code
    Code:
    redirect 301 /old/old.htm http://www.you.com/new.htm
     
  2. egywbas

    egywbas Registered Member

    Joined:
    Nov 30, 2010
    Messages:
    66
    Likes Received:
    5
    PHP:
    RewriteEngine on  
       
    [IMG]http://cdn5.tribalfusion.com/media/37536.gif[/IMG]    RewriteBase /  
    RewriteCond %{HTTP_HOST} !^www.egywbas.com
    RewriteRule 
    (.*) http://www.egywbas.com /$1 [R=301,L]  
    replace egywbas.com with ur site :)
    i hope is that wht u mean ..
    if not .. just let me know :)
     
    Last edited: Mar 31, 2011
  3. egywbas

    egywbas Registered Member

    Joined:
    Nov 30, 2010
    Messages:
    66
    Likes Received:
    5
    but if u need to change it direct

    PHP:
                          redirect 301 /mail.php http://www.egywbas.com/mail.html 
    exapmle .. mail.php was ur old page and u change it to html .
    so u should replace it with urs :)