# Disable Webdav completely?

**URL:** <https://help.nextcloud.com/t/disable-webdav-completely/27573>\
**Category:** ℹ️ Support\
**Created:** [February 15, 2018, 2:49pm UTC](https://help.nextcloud.com/t/disable-webdav-completely/27573 "2018-02-15T14:49:25Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![4d1](https://help.nextcloud.com/letter_avatar/4d1/32/6_22734026db12803ebb3e059622ac3534.png) [@4d1](https://help.nextcloud.com/u/4d1)\
**Post date:** [January 29, 2020, 3:04pm UTC](https://help.nextcloud.com/t/disable-webdav-completely/27573/7 "2020-01-29T15:04:44Z")

</div>

the desktop client tries to get authorization via /index.php/login/v2/grant

you can put this inside your Apache-vhost-config (.htaccess would work too)  
RewriteCond %{REQUEST\_URI} ^/index.php/login/v2/grant  
RewriteRule ^(.\*)$ [https://example.com/index.php/login](https://example.com/index.php/login) [L,R=301]

and some more conditions for the Android client  
RewriteCond %{REQUEST\_URI} ^/index.php/login/flow/grant(._)$ [OR]  
RewriteCond %{REQUEST\_URI} ^/core/js/login/grant(._)$ [OR]  
RewriteCond %{REQUEST\_URI} ^/index.php/login/flow/grant(._)$  
RewriteRule ^(._)$ [https://example.com/index.php/login](https://example.com/index.php/login) [L,R=403]

this only prohibits the android client to authenticate at first login! If the client was already registered, it won’t stop that connection.

---

_[View the full topic](https://help.nextcloud.com/t/disable-webdav-completely/27573)._
