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

301 redirect - need help please..

Discussion in 'Search Engine Optimization (SEO)' started by YS*, Jul 10, 2007.

  1. YS*

    YS* New Member

    Joined:
    Jul 10, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    Search Engine Optimization FAQ's has your answer and I will quote it here.

     
  3. YS*

    YS* New Member

    Joined:
    Jul 10, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    it doesn't work..

    PHP:
    RewriteEngine On
    RewriteCond 
    %{HTTP_HOST} ^(www\.)?atraf-f.net\.net/upload$ [NC]
    RewriteRule ^(.*)$ http://www.atraf-f.net/$1 [R=301,L]
    i've edited it, i need it to redirect all the pages from in a directory to an other domain name,
    here i'vw just tested the code so i've used the same domain, what to do ?
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    The inherent problem I see in your editing capabilities is you are changing all the \. to .
     
  5. YS*

    YS* New Member

    Joined:
    Jul 10, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    still not working..
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www\.)?atraf-f\.net/upload$ [NC]
    RewriteRule ^(.*)$ http://www.atraf-f.net/$1 [R=301,L]
     
  6. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    I am not sure why its not working but when I visited the forum I saw you are setting up the new forum and so why not just move the files from the upload directory to the parent one. Unnecessary redirect would not help.
     
  7. YS*

    YS* New Member

    Joined:
    Jul 10, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
  8. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    Does your web host support the .htaccess redirect? It may be the case that it does not.
     
  9. YS*

    YS* New Member

    Joined:
    Jul 10, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    off course.
    i'm using redirects in my root folder..
     
  10. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    But then you should always use the code I gave in the root folder only.
     

Share This Page