WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP redirects archives by date to home page (3 posts)

  1. baal666
    Member
    Posted 5 years ago #

    Hi,

    I don't know what I did, but I did something wrong. When someone tries to access my archives (e.g. http://lelectronlibre.net/2008/03/) it redirects to my home page. Same thing when I try to access the archives from the "modify post" admin panel.

    Lately I modified some things to make SEO better, but I just don't know what went wrong. Here is my .htaccess

    <IfModule mod_rewrite.c>
    RewriteEngine On
    # If subdomain www exists, remove it first
    RewriteCond %{HTTP_HOST} ^www\.([^\.]+\.[^\.]+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    # If requested resource does not exist as a file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and does not end with a period followed by a filetype
    RewriteCond %{REQUEST_URI} !..+$
    # and does not end with a slash
    RewriteCond %{REQUEST_URI} !/$
    # then add a trailing slash and redirect
    RewriteRule (.*) $1/ [R=301,L]
    </IfModule>
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    which is in public_html folder. I tried to put back the original one but it changed nothing. This must be something else.

    Anyone has any idea what can be the cause of this?

    Thanks!

    p.s. BTW, should I put .htaccess in the root or in public_html? Thanks
    p.s.1 I don't blog in the root, in case it changes anything. By the way, my categories work fine: http://lelectronlibre.net/category/enjeux-sociaux/ but http://lelectronlibre.net/2008/02/ does not work...

  2. baal666
    Member
    Posted 5 years ago #

    Ok I found the problem. This was caused by an option in Robots Meta Configuration that was disabling the archives. Sorry for the trouble. LOL

  3. rmsylte
    Member
    Posted 4 years ago #

    Thank you so much for posting the fix!

Topic Closed

This topic has been closed to new replies.

About this Topic