Bizzare .htaccess Issue

Discussion in 'Install/Configuration' started by mhere, Apr 27, 2009.

  1. mhere

    mhere New Member

    First of all, yes, I did read all other threads relating to this first :)

    Ok, right.

    My System:


    It's al installed, working fine and very fast, no problems there. The issue is that I'm not able to have both a .htaccess pwd and the wordpress rewrite working at the same time :s

    Either rule works perfectly alone, but when they're in the (same oc) .htaccess file together it just loads the naked php (with no css/js/imgs) and none of the links work. Nor does it ask for a password.

    Both work perfectly alone.

    Here's my .htaccess file, mabe it's incorrect, I know my way around a server but I'm hardly an expert.

    AuthType Basic
    "Woah, come back in around 48 hours"
    AuthUserFile "/home/xxxxxxxxx/xxxxxxxxxxxxx/public_html/passwd"
    require valid-user

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    . /index.php [L]

    # END WordPress
  2. Richard

    Richard Member

  3. mistwang

    mistwang LiteSpeed Staff

    I think the issue is that a custom error page for 401 has been defined in the configuration, but the file does not exist for your vhost, so the 401 reply will be rewritten to index.php.

    Try adding a 401 page under the document root, usually, it is /401.shtml for cPanel server.
  4. mhere

    mhere New Member

    Yep, that's fixed it, thanks a lot :)
  5. Richard

    Richard Member

    edit: nevermind... got it working
    Last edited: Apr 28, 2009

Share This Page