svn commit: r1752863 - in /ofbiz/trunk: applications/product/config/SeoConfig.xml specialpurpose/ecommerce/config/SeoConfig.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1752863 - in /ofbiz/trunk: applications/product/config/SeoConfig.xml specialpurpose/ecommerce/config/SeoConfig.xml

jleroux@apache.org
Author: jleroux
Date: Fri Jul 15 18:26:44 2016
New Revision: 1752863

URL: http://svn.apache.org/viewvc?rev=1752863&view=rev
Log:
A patch from Pierre Smits for "Move SeoConfig.xml to e-commerce" https://issues.apache.org/jira/browse/OFBIZ-6125

Currently the configuration file (SeoConfig.xml) is incorporated in the product component. However this is more related to how the e-commerce operates than to the functions in the backend catalog and warehousing applications.
The file should therefore be moved to its appropriate place.

Added:
    ofbiz/trunk/specialpurpose/ecommerce/config/SeoConfig.xml   (with props)
Removed:
    ofbiz/trunk/applications/product/config/SeoConfig.xml

Added: ofbiz/trunk/specialpurpose/ecommerce/config/SeoConfig.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/config/SeoConfig.xml?rev=1752863&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/config/SeoConfig.xml (added)
+++ ofbiz/trunk/specialpurpose/ecommerce/config/SeoConfig.xml Fri Jul 15 18:26:44 2016
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<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>

Propchange: ofbiz/trunk/specialpurpose/ecommerce/config/SeoConfig.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/ecommerce/config/SeoConfig.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/ecommerce/config/SeoConfig.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml