Nginx webdav from other subdomain

My installation is in the root of a Subdomain on my server. I can access it via As a result, i can access WebDAV via Is there a way to access the same WebDAV under and also with the same content, credentials and so on?

Currently i have added a directive like rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect; in nginx vhost config, with this i could access but it want redirect to But i wish no redirect, i will use something like a alias.

Does anyone heave some examples?

I think in the nginx example, short urls are already considered by this:

location / {
    rewrite ^ /index.php$uri;

In apache this would be the htaccess-rewritebase setting. But I think every time the user then gets redirected to the long URL.

Yes this redirect the user to the other url. My goal is it, to not have remote.php expose to the Users in the URL…