Fork me on GitHub

need help with redirect  Bottom

  • Hi All:

    First, Merry Christmas to all!. I have this problem. I have old site domain
    www.oldsite.com. It have been indexed heavily by Google. I changed domain to www.newsite.com/index.php

    I changed domain name as it will loose power after 2004... How I could write a redirect for .htaccess that redirects all traffic to www.newsite.com/index.php

    Both sites refer to the same files and same server. I don't want to loose all that traffic. I already have changed old site index file to an HTML that redirects to new site, BUT already indexed links still work and move users to the 'old' site

    Any recommendation??

    TIA

    Edfel icon_rolleyes wink :shock: :(
  • I think it's just:

    redirect /index.php http://www.newsite.com


    add that to your htaccess file (in the root of the old site) and then try going to index.php on the old site..

    ..hope it works.. hehe
  • InvalidResponse:

    Both sites share same root... same files...

    Hmmm
    icon_rolleyes
  • edfel

    Hi All:

    First, Merry Christmas to all!. I have this problem. I have old site domain
    www.oldsite.com. It have been indexed heavily by Google. I changed domain to www.newsite.com/index.php

    I changed domain name as it will loose power after 2004... How I could write a redirect for .htaccess that redirects all traffic to www.newsite.com/index.php

    Both sites refer to the same files and same server. I don't want to loose all that traffic. I already have changed politica204.com index file to an HTML that redirects to new site, BUT already indexed links still work and move users to the 'old' site

    Any recommendation??

    TIA

    Edfel icon_rolleyes wink :shock: :(


    In .htaccess put:

    RewriteCond %{HTTP_HOST} ^newdomain\.com
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,QSA,L]

    This will redirect all to the equivalent on the new domain, providing you keep the same directory structure.

    The R=301 flag will ensure that the moved permanently header is returned to the caller, and the QSA (Query String Append) flag will rewrite your URI and append the original QUERY_STRING once rewritten.

    You can also use:

    redirect permanent / http://www.example.com/

    This will only work it the file structure is exact on the new server as well.

    But you said your old domain will "loose power" after 2004. I don't know exactly what you mean by "loose power" but I asusme it means you will no longer have the old domain to use. Since 2004 will be over in a few days it may be too late to effect this properly.

    If that domain becomes inaccessible or hosted by someone else none of the rewrite or redirect statements will work unless the old domain continues to be accessible and has these rules in an .htaccess or httpd.conf file for at least long enough to give googlebot time to reindex the new site and follow links (provided you dont have nofollow in the meta tags). Ususally Google will stop indexing the old domain after a redirect permanent is recieved by googlebot. Exeption to this is dependant on the amount of external referrers to the old domain.

    Enjoy!
    Zoom
  • No luck I am getting Forbidden error... the first seems to not work

    :(

    I own both domains... Just want to 'move' or redirect traffict from old site to --> new domain.

    Later
  • hey edfel..

    I'm not sure I understand either ;) ..if the domain is going to expire, you won't be able to redirect it after it expires.. if you want to redirect it now to the new URL ..the something like before maybe (in htaccess):

    redirect http://www.oldname.com http://www.newname.com

    ..I'd proably just post an announcement of name change and leave it at that :)
  • You've evidently got it redirecting somehow because I just went to politica2004.com and it redirected me to politcaboricua.com.

    BTW...nice looking site :)

    Zoom
  • Yes, I did after digging some more... I used a PHP script:



    Maybe my setup was culprit for the redirect not to work at first instance but... oh well I believe I have now what I wanted...

    I even replaced key modules index.php files with the above code and now links at Google (with the old domain for News, Forums Post, etc) are also redirected to the new domain. Some hours of dirty work but it is working so far...

    Thanks for the words about the site... I am not a designer per se, IT is a major overhaul of a custom theme made for me by Lobos...

    Original Theme is this one...
    http://www.politicaboricua.com/index.php?theme=Politica2004


    Later and Thanks Both!

This list is based on users active over the last 60 minutes.