WordPress.org

Ready to get started?Download WordPress

Forums

.htaccess block blog access?! (6 posts)

  1. MathiasBynens
    Member
    Posted 10 years ago #

    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?

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    What do you exactly want your htaccess file to do ?

  3. Cena
    Member
    Posted 10 years ago #

    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.

  4. Stephan
    Member
    Posted 10 years ago #

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

  5. MathiasBynens
    Member
    Posted 10 years ago #

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

  6. Rogier
    Member
    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.