Forums / Setup & design / Webdav : Rewriting Rules conflicts : Error 500

Webdav : Rewriting Rules conflicts : Error 500

Author Message

H-Works Agency

Thursday 07 August 2008 4:36:09 am

Hello,

I am trying to use the webdav extention since 3 years now.

I managed to make it almost work a few times but had never been able to put it in a production environnement.

There is always something going wrong :

- FolderClasses list is not working (adding class gallery for exemple doesn't display)
- Images object are not even showing up
- Uploading mime types recognition doesn't work. It always create a "file" object.
- Webdav access doesn't seem to respect the override process. When i drag an object in webdav, it creates an object but not a node and use a wrong language (default eng-GB).
- MacOsX Transmit is not displaying other classes than "folder"
- Root folders in Webdav are always "Content" and "Media", even if you switched "Content" with another class leading to a 404 error when accessing "Content".

In the one i am trying to build now there is a new problem :

I have a error 500 when trying to access webdav. Apache error log says its a rewriting rules conflict though i just implemented those rules according to the ezp instructions.

In .htacces i have :

RewriteEngine On
RewriteRule content/treemenu/?$ index_treemenu.php
RewriteRule index_treemenu.php - [L]

RewriteRule !\.(ico|swf|flv|gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php

DirectoryIndex index.php

And in my apache conf i have :

<Directory /home/user/publish_html/ezpublish>
    Options FollowSymLinks Indexes ExecCGI
    AllowOverride None
</Directory>

ServerName webdav.hworks-agency.com
DocumentRoot /home/user/public_html/ezpublish
RewriteEngine On

RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) /webdav.php [L]

RewriteRule . /webdav.php

When i remove the line :

RewriteRule !\.(ico|swf|flv|gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php" webdav connexion works.

Can someone help me with this webdav module ? It would be great to be able to use this feature as it should.

Please don't send me to the ezp doc about webdav. I already know it and its not working.

Thanx !

EZP is Great

Andrew Duck

Wednesday 17 September 2008 12:20:51 pm

Martin,

Personally I would move all your rewrite rules to simplify your setup. According to your apache conf above "AllowOverride None" should disable the use of .htaccess for the ezpublish folder in any case. Disabling .htaccess will provide performance increases.

Try this in your apache conf...

<Directory /home/user/publish_html/ezpublish>
   Options FollowSymLinks Indexes ExecCGI
   AllowOverride None
</Directory>
 
ServerName webdav.hworks-agency.com
DocumentRoot /home/user/public_html/ezpublish
RewriteEngine On
 
RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) /webdav.php [L]
 
RewriteRule content/treemenu/?$ index_treemenu.php
RewriteRule index_treemenu.php - [L]
 
RewriteRule !\.(ico|swf|flv|gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php
 
DirectoryIndex index.php

Please note I removed Rewriterule . /webdav.php

Let me know if that helps you out at all.

Regards,
Andrew.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck