how can pass a variable in redirect? 1.{% set workTitle = craft.request.getLastSegment()  %}
2.{% if currentUser %}
3.     {{workTitle}}
4.{% else %}
5.  {% redirect "/visit/index?artwork=workTitle" %}
6.{% endif %}


Each line of code are working fine except the line 5. I set a value on line 1. Line 3 returns the set value but on line 5 when am trying to redirect it doesn't return correct path.
Redirect returns the below path instead of the returning the set value of workTitle.

http://abc.dev/visit/index?artwork=workTitle
I think:

{% redirect "/visit/index?artwork="~workTitle %}