How to configure Internal and External Redirects in CQ5

There are multiple ways in CQ to redirect you to any page internally or externally. One of the most common of them is using Vanity URL’s. They are easily editable and the authors can also tweak them on fly. However, they are not manageable due to the fact that they can be configured on page individually.

So, if you consider managing these URLs a herculean task, don’t panic, there are other shorter and simpler ways by which you can redirect user to internal as well as external sites.

I wanted to attach a package with redirect contents but my free wordpress account does not allow me to add a zip file 😦 😦 . So, i have illustrated the approach in layman language hope this will clarify the redirection process.

 create node http(jcr:primaryType="sling:OrderedFolder") //below map  
 on http node  
      create node internal_redirect   
                          jcr:primaryType="sling:Mapping"  
                          sling:internalRedirect=/content/geometrixx/en/community.html ->Type String   //internal redirect
                          sling:match=\[^/]+/content/geometrixx/en/events.html -> Type String   
      create node external_redirect   
                          jcr:primaryType="sling:Mapping"  
                          sling:redirect=http://www.google.com ->Type String   // external redirect
                          sling:match=\[^/]+/content/geometrixx/en/toolbar.html -> Type String   
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s