0

I am trying to do the following - essentially redirect to the correct page if search query only returns a single result.

{if total_results == "1"}{redirect="{comment_url_title_auto_path}"}{/if}

This is working, however, it's also appending the domain to the URL, so the resulting redirect is

http://domain.com/http://domain.com/template/view/url-title/

Is this possible at all?

Regards,

Christiaan

1 Answer 1

0

That approach should work just fine.

The {comment_url_title_auto_path} variable is parsed by native EE code. So if that results in an unexpected url, you might want to check the value of that setting in the Channel Preferences.

1
  • Thanks - that was it - the Channel preferences had the full domain in the URL path fields.
    – christiaan
    Dec 11, 2014 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.