[TriLUG] HTML - breaking redirects gracefully
Owen Berry
oberry at trilug.org
Wed Mar 7 10:43:31 EST 2007
Take a look at the Apache AliasMatch [1] or RedirectMatch [2]
directives. An example:
AliasMatch ^/affiliates/.* /var/www/html/affindex.html
RedirectMatch ^/affiliates/.* /var/www/html/affindex.html
You probably want the redirect but an alias will allow you to do the
same thing without a redirect, although you might need to use a base
href in the "affindex.html" page so that images, css files and
javascript get found correctly.
[1] http://httpd.apache.org/docs/2.0/mod/mod_alias.html#aliasmatch
[2] http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirectmatch
On Tue, Mar 06, 2007 at 09:20:18PM -0500, Michael Rulison wrote:
> If off topic (OT) please discard.
>
> But:
> I am renovating a web site that consists of
> 1 directories and their contents all concerned with "Affiliates"
> all of these belong in a directory called "affiliates"
> 2 files that deal with "Affiliates"
> mostly these redirect the browser to some external web site
> 3 files that are NOT "affiliates.
> these should have a hierarchy but do not; they are 'flat'.
>
> There are scores of each kind of file (1, 2, 3)
>
> I have a new site in development with two major categories (ignoring
> css, assets, etc.)
> affiliates - directories and their pages.
> nonaffiliate pages (with an enclosing set of directories).
>
> Problem: I want to get rid of all of group 2, above. But if I do, links
> printed on paper and in www sites across the country will break (404).
> Folks will be unhappy.
>
> Is there a way to create a 'universal' and graceful redirect (from links
> that disappear if I delete group 2), to a place where users will get
> access to all the affiliate data in one comprehensive menu? The menu is
> done and is linked to from the new site. But there are still scores of
> group 2 files glopping up the site That I want to delete..
>
> I welcome your thoughts. And Thanks.
>
> __________________________________________
> Michael Rulison | President | 919/782-9576
> Funeral Consumers Alliance of the Triangle
> 3256 Lewis Farm Road Raleigh NC 27607-6723
> www.rtpnet.org/endolife tacf at bellsouth.net
> __________________________________________
>
>
>
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>
More information about the TriLUG
mailing list