How can I ensure using actionUrl in my template does not show script name in the generated URL?
actionUrl() and UrlHelper::getActionUrl() always force the script name to show up despite the omitScriptNameInUrls config setting for two reasons:


Action URLs are generally not actually visible to end users, so there’s no point in hiding “index.php” from them (computers don’t care about aesthetics).
They are often used for POST requests, and your index.php redirect in .htaccess will drop any POST data associated with the request.


That said, if you really want to create an action URL that omits “index.php”, you can do this:

{{ url(craft.config.actionTrigger ~ '/your/action/path') }}


(I don’t think your use case is valid though. Just commented on it.)