Pierre Smits suggested: "Another workaround is to copy SeoConfig.xml to the config folder of a component in the application stack, e.g. commonext" jleroux: Good idea Pierre, actually the SEO is not only for ecommerce, and could also be used by hot-deploy (or later plugins) ecommerce alike or of other types components/plugins. But we were once again wrong when moving SeoConfig.xml to e-commerce at r1752863 for OFBIZ-6125. I applied your patch when I should have moved the file myself locally and committed directly. So reverted r1752863 at r1755032 and here is the right move. Since SeoConfig.xml is located at init by UtilURL.fromResource() its location is not a pb. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755034 13f79535-47bb-0310-9956-ffa450edef68
135 lines
5.2 KiB
XML
135 lines
5.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
<seo-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../dtd/SeoConfig.xsd">
|
|
<regexpifmatch>^.*/.*$</regexpifmatch>
|
|
|
|
<category-url>
|
|
<value>enable</value>
|
|
<!-- enable/disable
|
|
1. if enable, the product seo url will be /product-name-product-id.html or /category-name-product-name-product-id.html
|
|
2. if disable, the CatalogUrlServlet.makeCatalogUrl will be used -->
|
|
<allowed-context-paths>/:/ecomseo</allowed-context-paths>
|
|
<!-- if category-url is enabled, only context paths listed here will be allowed to use the new seo transformers -->
|
|
<category-name>disable</category-name>
|
|
<!-- enable/disable
|
|
1. if enable, the product seo url will be /category-name-product-name-product-id.html
|
|
2. if disable, the product seo url will be /product-name-product-id.html -->
|
|
<category-url-suffix>.html</category-url-suffix>
|
|
<!-- suffix to add to the product seo url -->
|
|
</category-url>
|
|
|
|
<jsessionid>
|
|
<anonymous>
|
|
<value>disable</value>
|
|
<!-- enable/disable
|
|
1. when disable, the seo url patterns that contains jsessionid will be applied;
|
|
2. when enable, the seo url patterns that contains jsessionid will be skipped -->
|
|
</anonymous>
|
|
<user>
|
|
<value>disable</value>
|
|
<!-- enable/disable
|
|
1. when disable, the url-patterns under exceptions will be used to skip the seo url patterns that contains jsessionid;
|
|
2. when enable, the seo url patterns that contains jsessionid will be skipped -->
|
|
<exceptions>
|
|
<url-pattern>^.*/(keywordsearch|logout).*$</url-pattern>
|
|
<!-- sample: ^.*/(keywordsearch|logout).*$ -->
|
|
</exceptions>
|
|
</user>
|
|
</jsessionid>
|
|
|
|
<url-configs>
|
|
<url-config>
|
|
<description>sample: remove jsessionid</description>
|
|
<url-pattern>^(.*);jsessionid=(.*)jvm[1-9](.*)$</url-pattern>
|
|
<seo>
|
|
<replacement>$1$3</replacement>
|
|
</seo>
|
|
<forward>
|
|
<replacement>$1$3</replacement>
|
|
<responsecode>301</responsecode>
|
|
</forward>
|
|
</url-config>
|
|
|
|
<url-config>
|
|
<description>sample: remove /ecomseo/main</description>
|
|
<url-pattern>^/ecomseo/main$</url-pattern>
|
|
<seo>
|
|
<replacement>/ecomseo/</replacement>
|
|
</seo>
|
|
<forward>
|
|
<replacement>/ecomseo/</replacement>
|
|
<responsecode>301</responsecode>
|
|
</forward>
|
|
</url-config>
|
|
|
|
<url-config>
|
|
<description>sample: remove /main</description>
|
|
<url-pattern>^/main$</url-pattern>
|
|
<seo>
|
|
<replacement>/</replacement>
|
|
</seo>
|
|
<forward>
|
|
<replacement>/</replacement>
|
|
<responsecode>301</responsecode>
|
|
</forward>
|
|
</url-config>
|
|
</url-configs>
|
|
|
|
<char-filters>
|
|
<char-filter>
|
|
<character-pattern>\u00fc</character-pattern>
|
|
<replacement>ue</replacement>
|
|
</char-filter>
|
|
<char-filter>
|
|
<character-pattern>\u00e4</character-pattern>
|
|
<replacement>ae</replacement>
|
|
</char-filter>
|
|
<char-filter>
|
|
<character-pattern>\u00f6</character-pattern>
|
|
<replacement>oe</replacement>
|
|
</char-filter>
|
|
<char-filter>
|
|
<character-pattern>\u00df</character-pattern>
|
|
<replacement>ss</replacement>
|
|
</char-filter>
|
|
<char-filter>
|
|
<character-pattern>\\+</character-pattern>
|
|
<replacement>und</replacement>
|
|
</char-filter>
|
|
<char-filter>
|
|
<character-pattern>\u0026</character-pattern>
|
|
<replacement>und</replacement>
|
|
</char-filter>
|
|
<char-filter>
|
|
<character-pattern>è</character-pattern>
|
|
<replacement>e</replacement>
|
|
</char-filter>
|
|
<!-- please keep the following 2 filters, don't remove them -->
|
|
<char-filter>
|
|
<character-pattern>[^A-Za-z0-9+-]</character-pattern>
|
|
<replacement>-</replacement>
|
|
</char-filter>
|
|
<char-filter>
|
|
<character-pattern>-{2,}</character-pattern>
|
|
<replacement>-</replacement>
|
|
</char-filter>
|
|
</char-filters>
|
|
</seo-config>
|