Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the following rewrite rule, used for WordPress Network to handle the file requests:

   location @rewrite {                                                     
            rewrite ^/(.*)$ /index.php?q=$uri&$args;                        
            rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last; 
    }

I seems that running owncloud 3 on the same domain the dav requests are caught by this rule. Therefore I'd like to extend the line to only be applied of no owncloud word was found in the uri.

Can someone help me, please?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you can write a more specific rule, then that's probably beneficial - you don't want to accidentally exempt locations that should be rewritten; is there a specific directory you can apply this to?

That said, you can definitely just exempt anything with owncloud; add this to the location block above the existing rewrite lines:

rewrite ^(.*owncloud.*)$ $1 last;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.