This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Webmaster forum > January 2007 > Question about .htaccess and forwarding about 25 pages.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Question about .htaccess and forwarding about 25 pages.
|
|
| d362636@yahoo.com 2007-01-27, 11:09 pm |
| Ok, odd question: A buddy of mine just moved a very popular section of
his site to a folder to make things a bit more tidy and is noticing a
dramatic drop it visitors. Looking over it, I noticed it's because all
of these sites on the net that link to his site have the old address,
so when they click on it they get a 404.
Now I know all sorts of magic can be done via .htaccess so I told him
to let me look into it and see what I could find. Is there anything
sort of .htaccess rewrite rule that would do something like this?
redirect http://buddyssite/popularpage1.html to
http://buddyssite/popularpages/popularpage1.html
I'm assuming that once he does it for the first page, he'll have to do
the same thing for the other 24. I'm not real good at .htaccess, in
fact the problem I was having with images on my forum was solved by the
good people here(thanks again HansH and rh), but I thought I'd give it
a shot. This is what I found on the net so far, and it looks good but I
don't know if it'll work for his site or not:
http://uwmike.com/articles/2005/10/...per-forwarding/
As usual, any thoughts or suggestions would be most appreciated!
Thanks!
DM
| |
| Chaddy2222 2007-01-27, 11:09 pm |
|
d362636@yahoo.com wrote:
> Ok, odd question: A buddy of mine just moved a very popular section of
> his site to a folder to make things a bit more tidy and is noticing a
> dramatic drop it visitors. Looking over it, I noticed it's because all
> of these sites on the net that link to his site have the old address,
> so when they click on it they get a 404.
>
> Now I know all sorts of magic can be done via .htaccess so I told him
> to let me look into it and see what I could find. Is there anything
> sort of .htaccess rewrite rule that would do something like this?
>
> redirect http://buddyssite/popularpage1.html to
> http://buddyssite/popularpages/popularpage1.html
>
> I'm assuming that once he does it for the first page, he'll have to do
> the same thing for the other 24. I'm not real good at .htaccess, in
> fact the problem I was having with images on my forum was solved by the
> good people here(thanks again HansH and rh), but I thought I'd give it
> a shot. This is what I found on the net so far, and it looks good but I
> don't know if it'll work for his site or not:
>
> http://uwmike.com/articles/2005/10/...per-forwarding/
>
> As usual, any thoughts or suggestions would be most appreciated!
>
> Thanks!
>
> DM
Just 301 re-direct all the pages through .htaccess.
redirect 301 /popularpage1.html
http://www.example.com/newdirectory/popularpage1.html
I hope that helps.
--
Regards Chad. http://freewebdesign.cjb.cc
| |
| d362636@yahoo.com 2007-01-27, 11:09 pm |
| > Just 301 re-direct all the pages through .htaccess.
> redirect 301 /popularpage1.html
> http://www.example.com/newdirectory/popularpage1.html
> I hope that helps.
> --
> Regards Chad. http://freewebdesign.cjb.cc
Thanks man! I let my buddy know, he tested it out, it worked on one
page, he added the others and it worked out like a charm! Thanks so
much!! You know, though I'm still scared of the .htaccess file I'm
finding it to be a real blessing! :)
Thanks again,
DM
| |
| Chaddy2222 2007-01-27, 11:09 pm |
|
d362636@yahoo.com wrote:
>
> Thanks man! I let my buddy know, he tested it out, it worked on one
> page, he added the others and it worked out like a charm! Thanks so
> much!! You know, though I'm still scared of the .htaccess file I'm
> finding it to be a real blessing! :)
>
> Thanks again,
No problem.
--
Regards Chad. http://freewebdesign.cjb.cc
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|