BLOG: Web Content Management

Welcome to Oshyn’s Web Content Management Blog where our experts discuss the latest developments and best practices in the Content Management industry with a focus on several leading platforms: Drupal, EPiServer, Jahia, Open Text and Sitecore.

Jahia WCM SEO Friendly URLs

Jahia WCM SEO Friendly URLs

Juan Pablo Albuja... - Wednesday, January 06, 2010

In Enterprise environments, Jahia can be installed over other application Servers like JBoss. So in this post I want to explain how urlrewrite works with the Java API Tuckey that can be integrated in Jahia Enterprise installations. Also Jahia WCM can easily be leveraged to create SEO (Search Engine Optimization) Friendly URLs by your content editors.

Tuckey is a Java filter that permits J2EE web applications to implement urlrewrite based on the Apache mod_rewrite. This filter uses a configuration file called urlrewrite.xml located in the WEB-INF directory of your application. The way to enable Tuckey in JBoss is to modify the web.xml file of the instance for which you want to enable rewrite. This file is located in the WEB-INF directory and you need to enable Tuckey filter including the following configuration:


<filter>
          <filter-name>UrlRewriteFilter</filter-name>
          <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
           <init-param>
               <description>
                   set the amount of seconds the conf file will be checked for reload
               </description>
               <param-name>confReloadCheckInterval</param-name>
               <param-value>20</param-value>
           </init-param>
           <init-param>
               <description>
                   sets up log level
       </description>
               <param-name>logLevel</param-name>
               <param-value>INFO</param-value>
           </init-param>
    </filter>
    <filter-mapping>
       <filter-name>UrlRewriteFilter</filter-name>
               <url-pattern>/*</url-pattern>
    </filter-mapping>


Note that in the mapping section we are applying the UrlRewriteFilter to all the requests, and in the Filter section we are configuring the location of the filter class using the qualified name org.tuckey.web.filters.urlrewrite.UrlRewriteFilter. You need to be sure that the Tuckey jar is in the classpath of the web application, you can get it from here. You can put that jar in the folder WEB-INF/lib/ of your JBoss installation. Now urlrewrite is enabling and you can put your rules in the file urlrewrite.xml located in the WEB-INF folder.

From the editor perspective it is easy to assign friendly URLs. The following screenshot shows how easy it is to assign a friendly url to a Jahia page. The content author just needs to go to the Page settings option and assign a Page URL Key containing the URL alias for the current page.



Example

A situation to use JBOSS rewrite rules for is when you have an Apache server acting as a Proxy in front of your JBoss Application Server. To configure Apache to act as a proxy you need to connect via ajp to the JBoss server. To do that you need to add the following code in the default VirtualHost configuration:


ProxyPass / ajp://192.168.2.110:8009/jahia/cms/
ProxyPassReverse / ajp://192.168.2.110:8009/jahia/cms/


Where jahia/cms is the location of jahia instance.


Then you need to add the proper rules in the urlrewrite.xml in order that images and friendly urls appear correctly. Following is a sample rule that makes correct calls to the template resources used in the template set like css and template images.


<rule>
        <note>
            Template resources rule
        </note>
        <from>/cms/jahia/templates/</from>
        <to last="true">/templates/</to>
</rule>

ajax rotator
Recent Posts

RSS feeds
Tag cloud
LS mashups mashup mashware sales 2.0 content authors reddot whitepaper multilingual optimization Business Users profile box LDAP ubuntu liferay sitecore email campaign manager APC cms los angeles, content management los angeles, web development los angeles, website design los angeles, web design los angeles, sitecore meetup, sitecore user group google search appliance integration content management whitepaper Sitecore geo Visual Basic open source Web development GIS cms white paper css oms call to action modules postgis cms whitepaper linux industry challenges Velocity website design los angeles content mangement lead generation project management SMM Active Directory WCM Design Patterns oshyn open text ipc keywords Flash redundant database structure mobile Solr sitecore layout Ubuntu Server CMS usability Ubercart enterprise communicating scalability web2.0 keyword selection missing images cms los angeles Marketing Automation marketing portal web design editing content content authoring cluster open text delivery server java facebook app, OS 3.0, three20 design patterns cloud design html web3.0 ui web marketing for dummies target dynament jquery twitter templating rdbs geographical web content management web design los angeles EPiServer jquery, jquery plugin sitecore oms VB search engine E-commerce social 2.0 tools web evolution fbml RFP theming open text web solutions Live Server multisite IT Investment cloud computing licencing php lucene google maps google icefaces lead management CRM CMS concrete5 OO Development foursquare ajax open text cms sitecore meetup presentation layer IIS sitecore online marketing suite, online marketing suite inbound marketing facebook CMS Training sitecore ECM google analytics patterns command line MVC Acquia open-source .net drush reddot higher education google appEngine Jahia web services web marketing social network url social media thoughts sitecore devices facebook developers LiveServer dynament CTA webcomponent iphone VS2010 management print higher education campaigns profile tab portlets ajax push content management white paper development jahia cms tuning tuckey deployment Maven frontend optimization consulting friendly url Database SEO drools Drupal configuration management memcache Sharepoint search suggest web development los angeles mysql Sitecore Active Directory plugin reddot cms php5 reddot cms higher education jahia wcm wcm GSA data access content management los angeles JSR-168 reddot jsp Dynamic Data boost EPiServer Active Directory asp sitecore user group Visual Studio software design location architecture Actionscript 3 javascript open text management server AS3 reddot white paper content management systems new sites code design template design performance open text liveserver ASP.NET HubSpot opentext Delivery Server release management cookie-free domain ASP.NET MVC VPP spatial Navigation online marketing
2010 Copyright Oshyn. All rights reserved.