Support » Fixing WordPress » Archives and Comments not working

  • I just recently installed WP, and so far it’s been wonderful, but I just can’t seem to get the comments or the archives (and the search by category) to work. I hope this is a really easy fix, since I am a total newbie to this.
    I get a 404 message when I try to open any of them. My website is here: http://www.em-watson.net/wandless/ and my archive/category page is here: http://www.em-watson.net/wandless/blog/archives.php
    This is what is currently in my .htaccess file:
    DirectoryIndex index.php
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?em-watson.net/wandless(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?em-watson.net/wandless(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?wandless.em-watson.net(/)?.*$ [NC]
    RewriteRule .*\.(gif|GIF|jpg|JPG|jpeg|bmp|BMP|zip)$ http://em-watson.net/wandless [R,NC]
    RewriteBase /wandless/blog/
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /wandless/blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/category/?(.*) /wandless/blog/index.php?category_name=$1 [QSA]

    There is no archives folder, I thought that WP would automatically make one, but I guess not? I did make one myself, maybe that set it off? I just don’t understand what exactly I did wrong…Thanks for any help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • *bump*
    Also, to let you know, there is nothing wrong with my version of PHP, it is all good, it just never worked. You know how WP does that first entry and has one comment? The comment never worked, when I click on the comment link, it gives me a 404. Has anyone had this problem, or can see what I did wrong? Once again, thank you.

    Try making the last two rules as follows:

    RewriteRule ^archives/category/?(.*) /wandless/blog/index.php?category_name=$1 [QSA]
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/? /wandless/blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]

    swap them and then remove a $ from in before /wandless/blog…
    You could probably copy and paste what I have typed above in place of your current last two lines…

    Ok, now this is my current .htaccess (I wasn’t sure if I did this correctly..)
    DirectoryIndex index.php
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?em-watson.net/wandless(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?em-watson.net/wandless(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?wandless.em-watson.net(/)?.*$ [NC]
    RewriteRule .*\.(gif|GIF|jpg|JPG|jpeg|bmp|BMP|zip)$ http://em-watson.net/wandless [R,NC]
    RewriteBase /wandless/blog/
    RewriteRule ^archives/category/?(.*) /wandless/blog/index.php?category_name=$1 [QSA]
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/? /wandless/blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    And I still got a 404…Did I do it incorrectly? I wasn’t clear on what you said…(I am pretty much a newbie to this stuff..) Thank you very much for your help 🙂

    Yes you got all that right. Why do you have all the rewrite conditions? Just curious.
    Hmm, well, I thought that would solve it since it had for me. I suppose you could read up on rewrite rules, and try to get it running somehow, but you should not have to do that, thats too much work. 🙂

    The rewrite stuff was to prevent direct linking…But I’ll see if my host could make their own anti direct link file, and then I could get rid of mine…Do you think that would work, if I got rid of all the other stuff?

    *bump*
    And a note, I moved the index page to here:
    http://www.em-watson.net/wandless/index887.php
    And a mini question..How would I remove the horizontal scrollbar, and make custom color scrollbars for when multiple entries are there? I mean, I know how to do it, but I have been trying to do it, and it won’t do anything…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Archives and Comments not working’ is closed to new replies.