Do you have a requirement for specialised functionality built on Concrete CMS?
I am available for hire at an hourly rate or can offer a fixed price against a well defined requirement.

Notifications of private messages and support requests can be unreliable. If I have not responded within 24 hours, please email directly - contact details at c5magic.co.uk.

Thumbnail
Conditional Redirect

Developed by

Intermediate
Intermediate
Version 9 Ready!

Multi-Site Licensing

To obtain a multi-site license you must negotiate a special offer with JohntheFish, the developer of Conditional Redirect.

Click below to send a private message and begin the process. You may need to sign in to community.concretecms.com before you can message this user.

Send Message

A Conditional Redirect page attribute checks a condition and redirects to another page if the condition is / is not met.

Requires php7.2+.  Compatible with php8+.

Some use cases:

  • A/B testing - redirect to content A or content B based on location, ip address, date, time, random number.
  • Browser specific content - redirect based on user agent.
  • Time related content - see Example AM page and Example PM page.
  • Regional content - redirect based on continent, country, state.
  • User selected content - condition based on a user attribute.
  • Weak permissive content (see example below, not a substitute for permissions).
  • Redirect visitors to pages based on UTM tags (requires Form Reform UTM)

The Conditional Redirect attribute is a general purpose solution that can be configured for all of the above and more. I am sure users will come up with many more creative applications.

Redirect headers can be configurable as 301 or 302.

Stickiness

A further option is to Remember staying on the page for the duration of a user's session. This can be useful for A/B testing so a visitor sees a consistent A page or a consistent B page.

Where a page is shown depending on a user entering a query string parameter, such as in weak permissive content, Remember staying on the page can also be used to improve the user experience so they don't need to add the query string every time they want to re-visit the page.

Exemption

The Super Admin is always exempt from redirects. Other users exempt from redirects are configurable as:

  • None
  • Any registered user
  • Any user who views the page with the dashboard bar (editors, administrators)

Example

In the example below, a Conditional Redirect attribute is configured to redirect to the about page if the URL does not provide the query parameter lock containing bbb.

  • https://mysite.com/path/to/page?lock=bbb will show the page.
  • https://mysite.com/path/to/page will redirect to the about page.
  • https://mysite.com/path/to/page?something=else&lock=wxybbbaaa will show the page.
  • https://mysite.com/path/to/page?lock=abcde will redirect to the about page.

More complex compound conditions involving AND / OR logic can be configured.

A configuration such as this can provide a weak form of permission for site visitors. Only those who know the required URL can actually visit the page.

See more addons by JohntheFish.

Current Version: 1.0.3
Fully Translatable: Yes
Needs External Libraries: No
Compatible 8.5.4+
License: Standard
Support Response: Replies to tickets every few days.
Support Hosted: On marketplace.concretecms.com
Needs extra server permissions: No
Needs Internet: No
Marketplace Tests:
Passed Automated Tests
Passed PRB Review