WordPress.org

Ready to get started?Download WordPress

Forums

.htaccess rewrite stuffs WebDAV access (5 posts)

  1. deviant
    Member
    Posted 8 years ago #

    Hi there,

    I have just upgraded from 1.5.2 to 2.0 and have a couple of new 'undocumented features'. I used to use WebDAV to upload large amounts of data up to my server - no problem in 1.5.2, in 2.0 it got busted.

    Turnes out there is a new .htaccess file with a rewrite..

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php

    Once I commented it out, WebDAV started working again. What have I just broken by commenting this out?

    Also, I have an interesting one that I am not sure wher eto start... as I a here now.. :)

    I am using ezstatic and attempting to use microwiki both from RedAlt, and I can get microwiki to load when I use a query string. It supports friendly URLs which I switch on, but I just get a 404 error on my WordPress blog. I wrote a debug script..

    --test.php--

    $review = "/index.php?";
    $review .= "static=".$_REQUEST['static'];
    $review .= "&page=".$_REQUEST['page'];
    $review .= "&do=".$_REQUEST['do'];
    $review .= "&label=".$_REQUEST['label'];
    echo "<a href='$review'>$review</a>";

    --end of test.php--

    I have a mod_rewrite rule...

    RewriteRule ^_wiki?(/([^/]*))?(/([^/]*))?(/([^/]*))?$ /test.php?static=wiki&page=$2&do=$4&label=$6 [L]

    I h ate mod_rewrite, so I'll explain what this one does... basically it turns ...

    site.com/_wiki/$2/$4/$6

    into

    site.com/test.php?static=wiki&page=$2&do=$4&label=$6

    it works. It goes to my test page and prints out an index.php line that links to the right place... now, when I change the rewrite rule to say index.php?stati... (which the test.php generates) I get a 404 error on my blog.

    Any clues where this could be? I have checked the default theme: same. the fact the mod_rewrite directs to my test page, and the fact the link with the querystring seem to rule out the plugin and the wiki stuff... leaving the index.php

  2. deviant
    Member
    Posted 8 years ago #

    I have just found out what I broke by commenting out the rewrite rule... nice URLs for my WP posts... tough call WP posts... or everything else :)

    Is there a way to fix this?

  3. deviant
    Member
    Posted 8 years ago #

    There is also another issue to do with re-writing as previously mentioned.

    I have ezstatic and microwiki installed, and I have the re-write rule installed... it seems to redirect correctly - as the title in the browser is correct, however the page that displays is the 404 error of WordPress.

    Any ideas whats going on?

  4. emjem
    Member
    Posted 8 years ago #

    I have also had this problem since upgrading to 2.0
    I found a fix on the textdrive support site that seems to work - (even though its related to textpattern)
    http://kb.textdrive.com/article/webdav-versus-textpattern

    change the .htacces to the following

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]
    RewriteCond %{REQUEST_URI} !/(assets|dav|ical|_ical)
    RewriteRule ^(.*) index.php

    I am hosted on dreamhost and it seemed to fix the problem (but i am still going to move all my webdav folders to a sub domain incase wordpress decides to rewrite the htacess file again)

    good luck

    Michael

  5. scrytch
    Member
    Posted 7 years ago #

    Hi,

    I have this exact issue (WebDAV not allowing access when directory password authentication enabled on /dav folder).

    My blog is in the base directory, and WebDAV is in the /dav folder. If I comment out the section like Deviant did, I can login and authenticate fine. If left as standard I can't connect.

    Problem is - with the changes above (adding the extra line), I still can't get access.

    Do I need to make any other changes (ie to my index.php) or anything else?

    Thanks,
    Shane.

Topic Closed

This topic has been closed to new replies.

About this Topic