Help! 301 redirect not working.

Discussion in 'HTML' started by JB, Nov 21, 2006.

  1. JB

    JB Guest

    Ok, I have an old web page where I want the entire page to redirect to a new
    one.

    The old one is (some content edited)

    http://intergate.ca/personal/name/index.htm

    The new web page is:

    http://www.newpage.com

    I have made an .htaccess file using notepad, making sure it's not saved as a
    ..txt file.

    Notepad has wordwrap off.

    In the file I have:

    redirect 301 / http://www.newpage.com

    I have uploaded it to the root directory of the old site using CuteFTP in
    ascii transfer mode.

    Now when I access http://intergate.ca/personal/name/index.htm

    It wants to go here:

    http://www.newpage.compersonal/name/index.htm

    That is the exact URL that I get above, except for "newpage" and "name" have
    been changed.

    So what am I doing wrong?

    Thanks!

    JB
     
    JB, Nov 21, 2006
    #1
    1. Advertising

  2. JB wrote:
    > Ok, I have an old web page where I want the entire page to redirect to a new
    > one.
    >
    > The old one is (some content edited)
    >
    > http://intergate.ca/personal/name/index.htm
    >
    > The new web page is:
    >
    > http://www.newpage.com
    >
    > I have made an .htaccess file using notepad, making sure it's not saved as a
    > .txt file.
    >
    > Notepad has wordwrap off.
    >
    > In the file I have:
    >
    > redirect 301 / http://www.newpage.com
    >
    > I have uploaded it to the root directory of the old site using CuteFTP in
    > ascii transfer mode.
    >
    > Now when I access http://intergate.ca/personal/name/index.htm
    >
    > It wants to go here:
    >
    > http://www.newpage.compersonal/name/index.htm
    >
    > That is the exact URL that I get above, except for "newpage" and "name" have
    > been changed.
    >
    > So what am I doing wrong?


    redirect 301 / http://www.newpage.com/
     
    Harlan Messinger, Nov 21, 2006
    #2
    1. Advertising

  3. JB

    JB Guest

    Thanks, but now I get this:

    http://www.newpage.com/personal/name/

    Which is pretty much what I figured would happen after adding the "/" :)

    I can't get rid of that stupid directory name from my old site, being joined
    with the new.


    JB










    In article <>,
    says...
    >
    >JB wrote:
    >> Ok, I have an old web page where I want the entire page to redirect to a

    new
    >> one.
    >>
    >> The old one is (some content edited)
    >>
    >> http://intergate.ca/personal/name/index.htm
    >>
    >> The new web page is:
    >>
    >> http://www.newpage.com
    >>
    >> I have made an .htaccess file using notepad, making sure it's not saved as

    a
    >> .txt file.
    >>
    >> Notepad has wordwrap off.
    >>
    >> In the file I have:
    >>
    >> redirect 301 / http://www.newpage.com
    >>
    >> I have uploaded it to the root directory of the old site using CuteFTP in
    >> ascii transfer mode.
    >>
    >> Now when I access http://intergate.ca/personal/name/index.htm
    >>
    >> It wants to go here:
    >>
    >> http://www.newpage.compersonal/name/index.htm
    >>
    >> That is the exact URL that I get above, except for "newpage" and "name"

    have
    >> been changed.
    >>
    >> So what am I doing wrong?

    >
    >redirect 301 / http://www.newpage.com/
     
    JB, Nov 21, 2006
    #3
  4. JB wrote:
    [top-posting corrected]
    > In article <>,
    > says...
    >> JB wrote:
    >>> Ok, I have an old web page where I want the entire page to redirect to a

    > new
    >>> one.
    >>>
    >>> The old one is (some content edited)
    >>>
    >>> http://intergate.ca/personal/name/index.htm
    >>>
    >>> The new web page is:
    >>>
    >>> http://www.newpage.com
    >>>
    >>> I have made an .htaccess file using notepad, making sure it's not saved as

    > a
    >>> .txt file.
    >>>
    >>> Notepad has wordwrap off.
    >>>
    >>> In the file I have:
    >>>
    >>> redirect 301 / http://www.newpage.com
    >>>
    >>> I have uploaded it to the root directory of the old site using CuteFTP in
    >>> ascii transfer mode.
    >>>
    >>> Now when I access http://intergate.ca/personal/name/index.htm
    >>>
    >>> It wants to go here:
    >>>
    >>> http://www.newpage.compersonal/name/index.htm
    >>>
    >>> That is the exact URL that I get above, except for "newpage" and "name"

    > have
    >>> been changed.
    >>>
    >>> So what am I doing wrong?

    >> redirect 301 / http://www.newpage.com/

    >
    > Thanks, but now I get this:
    >
    > http://www.newpage.com/personal/name/
    >
    > Which is pretty much what I figured would happen after adding the "/" :)
    >
    > I can't get rid of that stupid directory name from my old site, being

    joined
    > with the new.


    Sorry, I misunderstood. OK, you want to replace

    http://intergate.ca/persona/name/index.htm

    with

    http://www.newpage.com/index.htm

    which amounts to changing

    /persona/name/

    to

    http://www.newpage.com/

    So

    redirect 301 /persona/name/ http://www.newpage.com/
     
    Harlan Messinger, Nov 21, 2006
    #4
  5. JB

    JB Guest

    That worked, thanks!

    It works if I type in http://intergate.ca/personal/name

    Can I make it so it will also work when typing in:

    http://intergate.ca/personal/name/index.htm

    If I type in the later, I get:

    http://www.newpage.com/index.htmlindex.htm

    So it's adding the index.htm.

    If it's too complicating, I'll just leave it as is.

    Thanks again,

    JB




    In article <>,
    says...
    >
    >JB wrote:
    >[top-posting corrected]
    >> In article <>,
    >> says...
    >>> JB wrote:
    >>>> Ok, I have an old web page where I want the entire page to redirect to a

    >> new
    >>>> one.
    >>>>
    >>>> The old one is (some content edited)
    >>>>
    >>>> http://intergate.ca/personal/name/index.htm
    >>>>
    >>>> The new web page is:
    >>>>
    >>>> http://www.newpage.com
    >>>>
    >>>> I have made an .htaccess file using notepad, making sure it's not saved

    as
    >> a
    >>>> .txt file.
    >>>>
    >>>> Notepad has wordwrap off.
    >>>>
    >>>> In the file I have:
    >>>>
    >>>> redirect 301 / http://www.newpage.com
    >>>>
    >>>> I have uploaded it to the root directory of the old site using CuteFTP in
    >>>> ascii transfer mode.
    >>>>
    >>>> Now when I access http://intergate.ca/personal/name/index.htm
    >>>>
    >>>> It wants to go here:
    >>>>
    >>>> http://www.newpage.compersonal/name/index.htm
    >>>>
    >>>> That is the exact URL that I get above, except for "newpage" and "name"

    >> have
    >>>> been changed.
    >>>>
    >>>> So what am I doing wrong?
    >>> redirect 301 / http://www.newpage.com/

    >>
    > > Thanks, but now I get this:
    > >
    > > http://www.newpage.com/personal/name/
    > >
    > > Which is pretty much what I figured would happen after adding the "/" :)
    > >
    > > I can't get rid of that stupid directory name from my old site, being

    >joined
    > > with the new.

    >
    >Sorry, I misunderstood. OK, you want to replace
    >
    >http://intergate.ca/persona/name/index.htm
    >
    >with
    >
    >http://www.newpage.com/index.htm
    >
    >which amounts to changing
    >
    >/persona/name/
    >
    >to
    >
    >http://www.newpage.com/
    >
    >So
    >
    >redirect 301 /persona/name/ http://www.newpage.com/
    >
    >
    >
     
    JB, Nov 21, 2006
    #5
  6. JB

    JB Guest

    Never mind, I got it to work. I had http://www.newpage.com/index.html since
    the index file was on newpage was .html. I just changed it to .htm and
    changed the.htaccess file back to http://www.newpage.com/

    Now I just have one last question for you or anyone else...I'm hoping my new
    site will gradually spider on Yahoo since the old was there. Should I delete
    all the old files from my old site, or wait a bit?

    Many thanks again,

    JB





    In article <s4H8h.60146$>,
    says...
    >
    >
    >That worked, thanks!
    >
    >It works if I type in http://intergate.ca/personal/name
    >
    >Can I make it so it will also work when typing in:
    >
    >http://intergate.ca/personal/name/index.htm
    >
    >If I type in the later, I get:
    >
    >http://www.newpage.com/index.htmlindex.htm
    >
    >So it's adding the index.htm.
    >
    >If it's too complicating, I'll just leave it as is.
    >
    >Thanks again,
    >
    >JB
    >
    >
    >
    >
    >In article <>,
    > says...
    >>
    >>JB wrote:
    >>[top-posting corrected]
    >>> In article <>,
    >>> says...
    >>>> JB wrote:
    >>>>> Ok, I have an old web page where I want the entire page to redirect to a
    >>> new
    >>>>> one.
    >>>>>
    >>>>> The old one is (some content edited)
    >>>>>
    >>>>> http://intergate.ca/personal/name/index.htm
    >>>>>
    >>>>> The new web page is:
    >>>>>
    >>>>> http://www.newpage.com
    >>>>>
    >>>>> I have made an .htaccess file using notepad, making sure it's not saved

    >as
    >>> a
    >>>>> .txt file.
    >>>>>
    >>>>> Notepad has wordwrap off.
    >>>>>
    >>>>> In the file I have:
    >>>>>
    >>>>> redirect 301 / http://www.newpage.com
    >>>>>
    >>>>> I have uploaded it to the root directory of the old site using CuteFTP

    in
    >>>>> ascii transfer mode.
    >>>>>
    >>>>> Now when I access http://intergate.ca/personal/name/index.htm
    >>>>>
    >>>>> It wants to go here:
    >>>>>
    >>>>> http://www.newpage.compersonal/name/index.htm
    >>>>>
    >>>>> That is the exact URL that I get above, except for "newpage" and "name"
    >>> have
    >>>>> been changed.
    >>>>>
    >>>>> So what am I doing wrong?
    >>>> redirect 301 / http://www.newpage.com/
    >>>
    >> > Thanks, but now I get this:
    >> >
    >> > http://www.newpage.com/personal/name/
    >> >
    >> > Which is pretty much what I figured would happen after adding the "/" :)
    >> >
    >> > I can't get rid of that stupid directory name from my old site, being

    >>joined
    >> > with the new.

    >>
    >>Sorry, I misunderstood. OK, you want to replace
    >>
    >>http://intergate.ca/persona/name/index.htm
    >>
    >>with
    >>
    >>http://www.newpage.com/index.htm
    >>
    >>which amounts to changing
    >>
    >>/persona/name/
    >>
    >>to
    >>
    >>http://www.newpage.com/
    >>
    >>So
    >>
    >>redirect 301 /persona/name/ http://www.newpage.com/
    >>
    >>
    >>

    >
     
    JB, Nov 21, 2006
    #6
  7. Re: Help! 301 redirect not working.

    JB wrote:

    > Never mind, I got it to work. I had
    > http://www.newpage.com/index.html since the index file was on newpage
    > was .html. I just changed it to .htm and changed the.htaccess file
    > back to http://www.newpage.com/
    >
    > Now I just have one last question for you or anyone else...I'm hoping
    > my new site will gradually spider on Yahoo since the old was there.
    > Should I delete all the old files from my old site, or wait a bit?


    Now that you're redirecting the site, you can safely delete all files
    except from the .htaccess file from your old website location. All URLs
    at the old location will be redirected, regardless of whether the files
    there exist or not, and neither of the old files will be read. Spiders
    will also be redirected to the new site.

    --
    Kim André Akerø
    -
    (remove NOSPAM to contact me directly)
     
    =?iso-8859-1?Q?Kim_Andr=E9_Aker=F8?=, Nov 22, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shan Plourde

    Re: 301 redirect to new domain

    Shan Plourde, Jul 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,363
    Shan Plourde
    Jul 23, 2004
  2. Luigi Donatello Asero

    Redirect 301

    Luigi Donatello Asero, Feb 23, 2006, in forum: HTML
    Replies:
    15
    Views:
    979
    Jonathan N. Little
    Feb 26, 2006
  3. frankmcma

    Undo 301 Redirect?...

    frankmcma, Apr 10, 2007, in forum: HTML
    Replies:
    3
    Views:
    9,662
    Jukka K. Korpela
    Apr 11, 2007
  4. Ross Culver

    301 Permanent Redirect

    Ross Culver, Aug 15, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    360
    Ross Culver
    Aug 15, 2007
  5. Eirik Eldorsen

    How to 301 redirect default.aspx to root

    Eirik Eldorsen, Nov 26, 2007, in forum: ASP .Net
    Replies:
    10
    Views:
    5,109
    ThatsIT.net.au
    Dec 22, 2007
Loading...

Share This Page