Forum Moderators: phranque

Message Too Old, No Replies

301 redirect

         

pjkinann

8:07 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



I am trying to redirect some old pages to the new pages on a site, even though the old pages can no longer be found (but if someone has bookmarked them for any reason - I need a redirect). I have been doing research and it's just a one liner on a specifically name file that doesn't have an extension but just has a period in front of it (I'm trying to describe this w/o naming anything specific to follow forum rules - this isn't easy! :o).

I tried doing this but it doesn't work. I just get a "page not found" error.

I can't seem to locate a tutorial on how to create this special file that redirects old pages which have new names.

Span

8:19 pm on Jun 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



pjkinann, do you mean .htaccess?

This is a redirect line:

Redirect 301 /folder/oldfilename.html [domain.com...]

pjkinann

8:48 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



.htaccess? Ooo............you said the word! SMILE I wasn't sure I could mention that. Yes, that's what I meant, and I've tried it but I still get a "page not found," but let me see your link and see if that is more descriptive. Thanks.

pjkinann

8:51 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



ummm.........that just took me to a domain registration site. I was looking for a tutorial that explains how to create the redirect 301 .htaccess file, one that works. :)

pjkinann

8:53 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



Oh, okay! wait! LOL YOu GAVE me the line. What I don't understand is that if I put that line alone and then upload it, I have no way of testing it because the old pages are no longer on the server. I guess the only way it would work is if someone happened to bookmark the page for any reason, correct?

pjkinann

8:54 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



1. How do I save the file without an extension? so that it's NOT a txt file?

2. Also, can I list all the pages on one file? or does each page have to be a separate one?

3. How long does one leave these htaccess files on the server?

4. Does it have to be in the folder where the pages are? or are they supposed to be in the root folder?

5. If the pages are no longer on the server, (because I get a page not found error) then this would just work for someone who happened to bookmark the page, correct?

6. Supposedly this saves your ranking on a SE, which is the only reason I'm doing it for the client.

Span

9:10 pm on Jun 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1. How do I save the file without an extension? so that it's NOT a txt file?
Call it htaccess.txt in your computer and rename it to .htaccess once you've uploaded it to the server.

2. Also, can I list all the pages on one file? or does each page have to be a separate one?
Yes, list all the pages on one file.

3. How long does one leave these htaccess files on the server?
Hard to say.. I'm seeing requests for pages that are gone since 2000 or 2001..

4. Does it have to be in the folder where the pages are? or are they supposed to be in the root folder?
In the root folder.

5. If the pages are no longer on the server, (because I get a page not found error) then this would just work for someone who happened to bookmark the page, correct?
Yes. You can test if it works by typing in the old URLs in your browser. You should be redirected and the address bar of your browser should show the new URL

6. Supposedly this saves your ranking on a SE, which is the only reason I'm doing it for the client.
Yes.

Sorry you had to talk to yourself for a while..

pjkinann

9:29 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



Thank you so much. Just a clarification on these two items:
You can test if it works by typing in the old URLs in your browser. You should be redirected and the address bar of your browser should show the new URL

When I type in the old url it comes up "page not found." So I'm unable to see if it works because the old pages are no longer on the server.

list all the pages on one file

I list all the old pages and new pages on the ONE htaccess page? Someone had said I needed one htaccess page for every old/new page. So it is important I clarify this one also.

Thank you again.

Span

9:45 pm on Jun 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When you have a working redirect, you can't get to the old pages because you are redirected. So you don't need the old pages for a redirect to work.
But it looks like you redirect is not doing anything or your link to the new page has a typo.
Does the 'Page Not Found' message tell which page could not be found? The old page or the new one?

And yes, list all your redirects on one .htaccess. You can only have multiple .htaccesses if you put them in different directories. No reason for that in your case.

pjkinann

10:09 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



Does the 'Page Not Found' message tell which page could not be found? The old page or the new one?

Refers to the old page.

Span

10:29 pm on Jun 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So you have, pjkinann, in the root of your domain (where the index file is) a file that is called .htaccess and in there are only redirects?
The old filename relative to the root (starting with a slash) and the new filename as an absolute URL?
Every redirect on a new line?

Redirect 301 /folder/oldfilename.html http://www.example.com/folder/newfilename.html
Redirect 301 /folder/oldfilename2.html http://www.example.com/folder/newfilename2.html

If you're sure the file is up there and the redirects are in there like above and it still isn't working you have to contact the host of the site to enable the use of .htaccess.

pjkinann

11:30 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



Redirect 301 /folder/oldfilename.html http://www.example.com/folder/newfilename.html

Yes, I set up each line appropriately, like above.

I did read that supposedly the redirect 301 is used for certain servers - can I mention the name of it here? and the host server, in this case, is a different one. If I can mention those on this forum then I can explain further.

So I'm wondering if that is the reason it wouldn't work. But again, I wouldn't know because I've not ever bookmarked any of the old pages for them to be cached and come up and have the redirect work.

Those old pages are no longer on the server, so when I type in the old url to a specific old page, it's just "not found."

Span

11:43 pm on Jun 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh.. so the site is not on an Apache server? In that case an .htaccess wouldn't do anything.
Yes you can mention server names here.

pjkinann

1:44 am on Jun 5, 2005 (gmt 0)

10+ Year Member



Oh phooey! After all that! SMILE It's the IIS Microsoft or something like that. Is there a redirect for that one?

Span

7:47 am on Jun 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, for redirects on IIS there is something called ISAPI rewrite module. You have to install it, I believe. But that's about all I know.
Maybe this forum search [google.com] will help you. Or try posting again with 'ISAPI 301 redirect' in the title.

pjkinann

5:38 pm on Jun 5, 2005 (gmt 0)

10+ Year Member



Maybe this forum search will help you. Or try posting again with 'ISAPI 301 redirect' in the title.

Oh, dear. That is definitely waaaaaaaaaaaaaaaaay beyond my scope of knowledge.

I can't believe there isn't an easier way to redirect old pages to new pages on a web site. Sigh...........