You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by da...@cocoon.zones.apache.org on 2007/06/07 18:21:17 UTC
[DAISY] Updated: Redirection
A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/1378.html
Document ID: 1378
Branch: main
Language: default
Name: Redirection (previously Redirects)
Document Type: Cocoon Document (unchanged)
Updated on: 6/7/07 4:21:03 PM
Updated by: Reinhard Pötz
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 4262 bytes (previous version: 4267 bytes)
Content diff:
(8 equal lines skipped)
<p>To redirect from <tt>page1.html</tt> to <tt>page2.html</tt>, you can use the
following:</p>
--- <pre>
--- <map:match pattern="page1.html">
+++ <pre> <map:match pattern="page1.html">
<map:redirect-to uri="page2.html"/>
</map:match>
(12 equal lines skipped)
page that called it, not relative to the URI of the sitemap containing it. Thus,
the following is incorrect:</p>
--- <pre>
--- <map:match pattern="folder/page1.html">
+++ <pre> <map:match pattern="folder/page1.html">
<map:redirect-to uri="folder/page2.html"/>
</map:match>
(2 equal lines skipped)
<p>This will in fact redirect the user to folder/folder/page2.html, which is
probably not intended. The correct version is:</p>
--- <pre>
--- <map:match pattern="folder/page1.html">
+++ <pre> <map:match pattern="folder/page1.html">
<map:redirect-to uri="page2.html"/>
</map:match>
(9 equal lines skipped)
<p>Directory handling is the same here as for other sitemap components. So that:
</p>
--- <pre>
--- <map:match pattern="folder/page1.html">
+++ <pre> <map:match pattern="folder/page1.html">
<map:redirect-to uri="cocoon:/folder/page2.html"/>
</map:match>
(24 equal lines skipped)
<tt>SC_MOVED_PERMANENTLY</tt> (<tt>301</tt>). A permanent redirect can be
specified as:</p>
--- <pre>
--- <map:match pattern="page1.html">
+++ <pre> <map:match pattern="page1.html">
<map:redirect-to uri="page2.html" permanent="yes"/>
</map:match>
(40 equal lines skipped)