|
Home > Archive > Web Servers on Unix and Linux > March 2007 > .htaccess problem
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]
|
|
| info@javelindesign.com 2006-12-15, 1:17 pm |
| Apache Pros,
I have a site with a TON of older "archive" pages, and while I'm not
recreating them, I would like to put them in an "OLD" folder on my
server so if anyone has them bookmarked/etc. they will be redirected
and no have a dead link.
so, basically, what I'm trying to do it;
xyz.com/003.html automatically goes to xyz.com/OLD/003.html
xyz.com/004.html automatically goes to xyz.com/OLD/004.html
xyz.com/005.html automatically goes to xyz.com/OLD/005.html
There are too many 00x.html files for me to put in a list, but rather
somehow I want to join the file not found with the redirect into the
OLD directory. Then, I can put my custom "File not found" page in
there. Make sense? PLEASE HELP.
Thanks,
Jay
| |
| Massimo Fabbri 2007-03-28, 1:15 pm |
| info@javelindesign.com wrote:
> Apache Pros,
>
> I have a site with a TON of older "archive" pages, and while I'm not
> recreating them, I would like to put them in an "OLD" folder on my
> server so if anyone has them bookmarked/etc. they will be redirected
> and no have a dead link.
>
> so, basically, what I'm trying to do it;
>
> xyz.com/003.html automatically goes to xyz.com/OLD/003.html
> xyz.com/004.html automatically goes to xyz.com/OLD/004.html
> xyz.com/005.html automatically goes to xyz.com/OLD/005.html
>
> There are too many 00x.html files for me to put in a list, but rather
> somehow I want to join the file not found with the redirect into the
> OLD directory. Then, I can put my custom "File not found" page in
> there. Make sense? PLEASE HELP.
>
> Thanks,
>
> Jay
>
Use mod_rewrite with an appropriate regular expression
|
|
|
|
|