CustomUrlBundle

Sulu gives the content-manager an easy way to manage custom-urls or landing pages. These urls can be defined in the webspace section. A custom-url is basically an additional url for a specific page. This url can have a completely different schema as the other urls which will be generated by the system. For example the localization is not present in this urls.

A custom-url consists of following properties:

Parameter

Description

Title

This title will be displayed in the list and should identify the use case of this url.

Published

This flag indicates if the custom-url is shown on the website.

Base Domain

The content-manager can choose one of the configured base-domains.

Custom-Url

After choosing the base-domain the * can be replaced with any value.

Target page and localization

The selected page will be displayed in the selected localization on this custom-url.

Redirect

The custom URL will be redirected to URL of the the linked page.

Canonical URL

When the Canonical URL has been activated only the linked page will be indexed by search engines.

No Index

The page will not be indexed by search engines.

No Follow

The links on the page will not be followed by search engines.

Note

If the target page gets deleted the custom-url will stay in the list, will be marked that the target is missing and returns a 404 on the website.

Configuration

The base-domains (which can be selected) will be configured in the webspace.xml of the environment.

<webspace>
    ...

    <portals>
        <portal>
            ...

            <environments>
                ...

                <environment type="dev">
                    <urls>
                        <url>sulu.lo/{localization}</url>
                    </urls>
                    <custom-urls>
                        <custom-url>sulu.lo/*</custom-url>
                        <custom-url>*.sulu.lo</custom-url>
                        <custom-url>*.sulu.lo/*</custom-url>
                    </custom-urls>
                </environment>
            </environments>
        </portal>
    </portals>
</webspace>

It is possible to set a wildcard (*) for subdomains and folders, which can be replaced by arbitrary values when creating a custom-url.

Note

Be aware of that different sub-domains or different domains has to be configured on the webserver. Very important is that you configure a wildcard for the subdomain if you will use it for custom-urls.