• I ran in to some problems running bbclone under WordPress when using Apache’s mod_rewrite to create nice WordPress permalinks and using .htaccess and .htpasswd to control authentication to bbclone.

    When I used this configuration, whenever I’d try to access the .htaccess protected bbclone URL, I would get redirected to my WordPress start page.

    After many long hours of experimenting, it turns out that the solution to this problem is very simple. What you’ll want to do is edit the top level .htaccess file, which contains WordPress’ rewrite rules, and insert the following line:

    RewriteCond %{REQUEST_URI} !/401.shtml

    So, if you have the default WordPress rewrite rules, they should now look like this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} !/401.shtml
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    The added line tells Apache’s mod_rewrite not to rewrite “/401.shtml”, which is what gets requested when an as yet unauthenticated user tries to access the .htaccess protected bbclone directory.

Viewing 1 replies (of 1 total)
  • jamessnell

    (@jamessnell)

    Any idea of this works on WP 2.5?

    I’m having a really tough time getting bbclone to play nicely with 2.5.

    Thanks,
    James

Viewing 1 replies (of 1 total)
  • The topic ‘Solved: bbclone, mod_rewrite, and .htaccess woes’ is closed to new replies.