Monday, March 25, 2013

How to change the root publish page from /content/geometrixx-outdoors/en.html to what you require

The Problem

When you type in you get redirected to

The Solution

It is best to fix the core of the problem, which is the target redirect on the /content folder.

A bit of mechanical sympathy first, however.

When you type in the default / url, cq5 will look at the Target Path setting in the Day CQ Root Mapping component.

This setting by default is set to /content.html

You can change the url at this point, however, it is not advisable to do so, as if the url ever changes, you will need to make a configuration change, rather than a content change.

So when you first hit the / directory, the Day CQ Root Mapping servlet changes the request to be /content

Within the /content folder, which can be viewed by using CRXDE Lite/Explorer, you will see that the sling:target setting, is to /geohome.

/geohome is set as the vanityPath for the geometrixx-outdoors site, which in turn has a redirectTarget set to /content/geomtetrixx/en

So if we change the /content folder to have the next correct address, such as /mysite or the equivalent starting point coded into the author instance, this will then replicate seamlessly to the publisher, and means that you don't have to rely upon apache rewrite rules to serve up the correct website.

No comments:

Post a Comment