Redirect to 404 when no results, but only if parameter is defined
This is an open discussion with 2 replies, filed under Troubleshooting.
Search
Combine this with adding the option for "Required URL Parameter" with {$category}
(or whatever your URL parameters is).
This will have the following effect: if $category
is empty, return no results. Then the page will redirect to 404 if "Redirect to 404 page..." check box is checked.
Thanks, I was missing the curly braces for the required URL parameter.
Create an account or sign in to comment.
I'd like to redirect the visitor to 404 when the URL parameter is invalid, but not if it is empty.
For example:
Clearly the second one is ok since the datasource will return results. The third is ok too since I can set the "Redirect to 404 page when no results are found" for the datasource, but this breaks the first.
Any ideas?
Thanks.