WordPress.org

Support

Support » How-To and Troubleshooting » .htaccess block blog access?!

.htaccess block blog access?!

  • I put this in my .htaccess file:
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/category/?(.*) /blog/index.php?category_name=$1 [QSA]

    (I want to use /archives/%year%/%monthnum%/%day%/%postname%/ as permalink structure.)
    When I set this htaccess file, I can’t access my blog anymore!!! Should there be any other lines in this file before these tags?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Mark (podz)

    @podz

    Support Maven

    What do you exactly want your htaccess file to do ?

    Make sure that 1)your base WordPress directory is ‘blog’ (as indicated in your .htaccess at Rewrite Base /blog/, and 2) that the .htaccess is located in that directory.

    I had the exact same problem, but with hand-coded HTML.
    The solution was to switch from Unicode encoded files to something else…

    Cena > that’s all right…
    podz > I just want it to have these nice archive structures, but it doesn’t seem to work…

    What do you mean, when you say ‘I can’t access my blog anymore’? Are you getting a 403 Forbidden. If that is the case, then perhaps you could add this line to your .htacces file:
    Options +SymLinksIfOwnerMatch
    That worked for me.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘.htaccess block blog access?!’ is closed to new replies.