| 1 | <?xml version="1.0" encoding="utf-8"?> |
|---|
| 2 | <!-- |
|---|
| 3 | $HeadURL:: $ |
|---|
| 4 | $Id$ |
|---|
| 5 | |
|---|
| 6 | Copyright (c) 2006-2008 by Topaz, Inc. |
|---|
| 7 | http://topazproject.org |
|---|
| 8 | |
|---|
| 9 | Licensed under the Apache License, Version 2.0 (the "License"); |
|---|
| 10 | you may not use this file except in compliance with the License. |
|---|
| 11 | You may obtain a copy of the License at |
|---|
| 12 | |
|---|
| 13 | http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 14 | |
|---|
| 15 | Unless required by applicable law or agreed to in writing, software |
|---|
| 16 | distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|---|
| 18 | See the License for the specific language governing permissions and |
|---|
| 19 | limitations under the License. |
|---|
| 20 | --> |
|---|
| 21 | <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN" |
|---|
| 22 | "http://tuckey.org/res/dtds/urlrewrite3.0.dtd"> |
|---|
| 23 | <!-- |
|---|
| 24 | Configuration file for UrlRewriteFilter |
|---|
| 25 | http://tuckey.org/urlrewrite/ |
|---|
| 26 | --> |
|---|
| 27 | <urlrewrite> |
|---|
| 28 | <rule> |
|---|
| 29 | <note> |
|---|
| 30 | re-write incoming trackbacks URIs. |
|---|
| 31 | /article/doi/trackback -> /trackback.action?trackbackId=doi |
|---|
| 32 | </note> |
|---|
| 33 | <from>^(/.+)?/article/(info:doi/10\.1371/.+)/trackback$</from> |
|---|
| 34 | <to>$1/trackback.action?trackbackId=$2</to> |
|---|
| 35 | </rule> |
|---|
| 36 | |
|---|
| 37 | <outbound-rule> |
|---|
| 38 | <note> |
|---|
| 39 | re-write outbound trackbacks URIs. |
|---|
| 40 | /trackback.action?trackbackId=doi -> /article/doi/trackback |
|---|
| 41 | </note> |
|---|
| 42 | <from>^(/.+)?/trackback.action\?trackbackId=(info%3Adoi%2F10\.1371%2F.+)$</from> |
|---|
| 43 | <to>$1/article/$2/trackback</to> |
|---|
| 44 | </outbound-rule> |
|---|
| 45 | |
|---|
| 46 | <rule> |
|---|
| 47 | <note> |
|---|
| 48 | re-write incoming related Article URIs. |
|---|
| 49 | /article/related/doi -> /article/fetchRelatedArticle.action?articleURI=doi |
|---|
| 50 | </note> |
|---|
| 51 | <from>^(/.+)?/article/related/(info:doi/10\.1371/.+)$</from> |
|---|
| 52 | <to last="true">$1/article/fetchRelatedArticle.action?articleURI=$2</to> |
|---|
| 53 | </rule> |
|---|
| 54 | |
|---|
| 55 | <outbound-rule> |
|---|
| 56 | <note> |
|---|
| 57 | re-write outbound Article URIs. |
|---|
| 58 | /article/related/fetchRelatedArticle.action?articleURI=doi -> /article/related/doi |
|---|
| 59 | </note> |
|---|
| 60 | <from>^(/.+)?/article/fetchRelatedArticle.action\?articleURI=(info%3Adoi%2F10\.1371%2F.+)</from> |
|---|
| 61 | <to>$1/article/related/$2</to> |
|---|
| 62 | </outbound-rule> |
|---|
| 63 | |
|---|
| 64 | <rule> |
|---|
| 65 | <note> |
|---|
| 66 | re-write incoming article comment URIs. |
|---|
| 67 | /article/comments/doi -> /article/fetchArticleComments.action?articleURI=doi |
|---|
| 68 | </note> |
|---|
| 69 | <from>^(/.+)?/article/comments/(info:doi/10\.1371/.+)$</from> |
|---|
| 70 | <!-- |
|---|
| 71 | I have to specify articleURI and target here as different actions use different |
|---|
| 72 | parameter names in the result chain specified in the struts.xml file |
|---|
| 73 | --> |
|---|
| 74 | <to last="true">$1/article/fetchArticleComments.action?articleURI=$2&amp;target=$2</to> |
|---|
| 75 | </rule> |
|---|
| 76 | |
|---|
| 77 | <outbound-rule> |
|---|
| 78 | <note> |
|---|
| 79 | re-write outbound Article URIs. |
|---|
| 80 | /article/fetchArticleComments.action?articleURI=doi -> /article/comments/doi |
|---|
| 81 | </note> |
|---|
| 82 | <from>^(/.+)?/article/fetchArticleComments.action\?articleURI=(info%3Adoi%2F10\.1371%2F.+)</from> |
|---|
| 83 | <to>$1/article/comments/$2</to> |
|---|
| 84 | </outbound-rule> |
|---|
| 85 | |
|---|
| 86 | <rule> |
|---|
| 87 | <note> |
|---|
| 88 | re-write incoming Article URIs. |
|---|
| 89 | /article/doi -> /article/fetchArticle.action?articleURI=doi |
|---|
| 90 | </note> |
|---|
| 91 | <from>^(/.+)?/article/(info:doi/10\.1371/.+)$</from> |
|---|
| 92 | <to last="true">$1/article/fetchArticle.action?articleURI=$2</to> |
|---|
| 93 | </rule> |
|---|
| 94 | |
|---|
| 95 | <outbound-rule> |
|---|
| 96 | <note> |
|---|
| 97 | re-write outbound Article URIs. |
|---|
| 98 | /article/fetchArticle.action?articleURI=doi -> /article/doi |
|---|
| 99 | </note> |
|---|
| 100 | <from>^(/.+)?/article/fetchArticle.action\?articleURI=(info%3Adoi%2F10\.1371%2F.+)</from> |
|---|
| 101 | <to>$1/article/$2</to> |
|---|
| 102 | </outbound-rule> |
|---|
| 103 | |
|---|
| 104 | <rule> |
|---|
| 105 | <note> |
|---|
| 106 | re-write incoming Annotation URIs. |
|---|
| 107 | /annotation/xxxx -> /annotation/listThread.action?root=xxxx |
|---|
| 108 | </note> |
|---|
| 109 | <from>^(/.+)?/annotation/(info:doi/10\.1371/.+)$</from> |
|---|
| 110 | <to last="true">$1/annotation/listThread.action?root=$2</to> |
|---|
| 111 | </rule> |
|---|
| 112 | |
|---|
| 113 | <outbound-rule> |
|---|
| 114 | <note> |
|---|
| 115 | re-write outbound Article URIs. |
|---|
| 116 | /annotation/listThread.action?doi=xxxx -> /annotation/xxxx |
|---|
| 117 | </note> |
|---|
| 118 | <from>^(/.+)?/annotation/listThread.action\?root=(info%3Adoi%2F10\.1371%2F.+)</from> |
|---|
| 119 | <to>$1/annotation/$2</to> |
|---|
| 120 | </outbound-rule> |
|---|
| 121 | |
|---|
| 122 | <rule> |
|---|
| 123 | <note> |
|---|
| 124 | re-write incoming Feed URIs. |
|---|
| 125 | /article/feed?... -> /article/feed/getFeed.action?... |
|---|
| 126 | </note> |
|---|
| 127 | <from>^(/.+)?/article/feed(\?.*)?</from> |
|---|
| 128 | <to>$1/article/feed/getFeed.action$2</to> |
|---|
| 129 | </rule> |
|---|
| 130 | |
|---|
| 131 | <outbound-rule> |
|---|
| 132 | <note> |
|---|
| 133 | re-write outbound Feed URIs. |
|---|
| 134 | /article/feed/getFeed.action?... -> /article/feed?... |
|---|
| 135 | </note> |
|---|
| 136 | <from>^(/.+)?/article/feed/getFeed.action(.*)?</from> |
|---|
| 137 | <to last="true">$1/article/feed$2</to> |
|---|
| 138 | </outbound-rule> |
|---|
| 139 | |
|---|
| 140 | </urlrewrite> |
|---|