This is a discussion on .htaccess problem within the Linux Web Servers forums, part of the Web Server and Related Forums category; Apache Pros, I have a site with a TON of older "archive" pages, and while I'm not ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |