3 Copyright (C) 2013 Free Software Foundation, Inc.
4 See the end of the file for license conditions.
6 NOTES FOR EMACS WWW PAGES
8 * Renaming pages, redirects
10 Sometimes you want to move a page to a new location.
11 If the old location might be referenced somewhere else, you should add
12 some form of redirect to the new location. There are several ways to
15 ** Use a refresh directive in the old file
16 https://www.gnu.org/server/standards/README.webmastering.html#htaccess
18 Change the entire contents of the old file to be something like:
20 <meta http-equiv="refresh" content="0; url=/software/emacs/manual/elisp.html">
22 I can't think of any reason to use this method.
24 ** Use a .symlinks file
25 https://www.gnu.org/server/standards/README.webmastering.html#symlinks
27 This is really an interface to mod_rewrite rules, but it acts like
28 symlinks. Remove old-page.html altogether, and create a ".symlinks"
29 file in the relevant directory, with contents of the form:
31 # This is a comment line.
32 old-page.html new-page.html
34 Anyone visiting old-page.html will be shown the contents of new-page.html.
35 Note that changes to .symlinks file are only updated periodically on
36 the server via cron (twice an hour?). So there will be a delay (of up
37 to 30 minutes?) before you see your changes take effect.
39 This method is ok, but:
40 i) a person visiting old-page.html has no idea that the page has moved.
41 They still see old-page.html in their address bar. (In other words,
42 the mod_rewrite rule does not use the [R] flag.) Sometimes this is
43 what you want, sometimes not.
45 ii) it doesn't work right if the new page is in a different directory
46 to the old page: relative links from the visited page will break.
48 ** Use a .htaccess file
50 Remove old-page.html altogether, and create a ".htaccess" file in the
51 relevant directory, with contents of the form:
53 # This is a comment line.
54 Redirect 301 /software/emacs/old-page.html /software/emacs/dir/new-page.html
56 Use "301" for a permanent redirection, otherwise you can omit the number.
57 Note that paths must (?) be relative to the top-level www.gnu.org.
59 I think this is the best method. You can specify temporary or
60 permanent redirects, and changes go live more-or-less straight away.
62 This method is useful for making cross-references to non-Emacs manuals
63 work; see manual/.htaccess in the repository. You only have to add a
64 single redirect for every given external manual, you can redirect
65 html_node to hmtl_node and html_mono to html_mono.
69 This file is part of GNU Emacs.
71 GNU Emacs is free software: you can redistribute it and/or modify
72 it under the terms of the GNU General Public License as published by
73 the Free Software Foundation, either version 3 of the License, or
74 (at your option) any later version.
76 GNU Emacs is distributed in the hope that it will be useful,
77 but WITHOUT ANY WARRANTY; without even the implied warranty of
78 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79 GNU General Public License for more details.
81 You should have received a copy of the GNU General Public License
82 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.