WordPress.org

Ready to get started?Download WordPress

Forums

Problems with archives and categories links (14 posts)

  1. aimbright
    Member
    Posted 9 years ago #

    Ok /archives/%postname%/ solved the first problem, now I see I have other problems that may be related. When I click on an Archive month link it goes to http://mydomain.com/wpname/archives/2005/07/ and I get page cannot be displayed error ... I look at my wp installation and there is no archives, etc. folders! I have the same problem with categories ... when I click on a category link ... it goes to http://mydomain.com/wpname/archives/category/categoryname/ but I don't have the archives, category folders. I am installing 1.5.1.3 wp blogs using Fantastico. Why doesn't the install set up the archives, category, year, month, etc. subdirectories?

  2. You don't need those folders. They are virtual directories. More info:

    http://codex.wordpress.org/Introduction_to_Blogging#Pretty_Permalinks
    http://codex.wordpress.org/Using_Permalinks

    As for your problem, if you want to have monthly archives via permalinks, you need to use a full structure with year, month, and day (which is recommended) like:

    /%year%/%monthnum%/%day%/%postname%/

    "If you use postname as the only element in your permalinks to create a structure such as myblog.com/post-title, the rewrite rules may make it impossible to access pages such as your stylesheet (which has a similar format) or the wp-admin folder. It's best to include some numeric data (e.g. the post ID or date) in the permalink to prevent this from happening. Additionally, WordPress v1.2.x requires the use of a date structure in order for some features, such as the calendar, to function properly. /%year%/%monthnum%/%day%/%postname%/ is always a good start."

  3. aimbright
    Member
    Posted 9 years ago #

    Should I use

    /%year%/%monthnum%/%day%/%postname%/

    OR

    /archives/%year%/%monthnum%/%day%/%postname%/

    How do I get Categories links to work?

  4. In the Structure field, enter:
    /%year%/%monthnum%/%day%/%postname%/

    Leave the Category Base field blank. Everything should work properly after that.

  5. aimbright
    Member
    Posted 9 years ago #

    I changed the permalink structure to /%year%/%monthnum%/%day%/%postname%/ and inserted the new rewrite rules in htaccess. I still get page cannot be displayed for archive and category links. Please visit my blog
    http://www.aimbright.com/loan-advice to see problems.

  6. I'm seeing a 404 for everything. Perhaps your hosting provider does not provide mod_rewrite? Try this:

    1. Load WordPress' Options/Permalinks in your browser.

    2. Delete your .htaccess file.

    3. Enter this into the structure field:

    /index.php/%year%/%monthnum%/%day%/%postname%/

    4. Leave the category base blank.

  7. aimbright
    Member
    Posted 9 years ago #

    Yes, my host does provide mod_rewrite.

    When I used structure /%year%/%monthnum%/%day%/%postname%/
    if you clicked on Archive July or August or if you clicked on Category Loan Information ... you got page cannot be displayed.

    Did you not see this?

    So then I used structure /index.php/%year%/%monthnum%/%day%/%postname%/

    and put in the new rewrite rules in htaccess. Then when I went to the blog I got Internal Server Error.

    So I took out all of the permalink rewrite rules for this blog from htaccess and now the Archives for July and August and the Categories links work. So I guess if you use permalinks you cannot use Archive and Category links.

    Correct?

  8. Did you not see this?

    Yes, I did. "404" = "page cannot be displayed" or page cannot be found.

    So then I used structure /index.php/%year%/%monthnum%/%day%/%postname%/

    and put in the new rewrite rules in htaccess. Then when I went to the blog I got Internal Server Error.

    There should be no rewrite rules generated by that structure. Did you not see step 2?

    So I guess if you use permalinks you cannot use Archive and Category links.

    No, not true. There are plenty of use using permalinks with working archive and category links.

    Let's start from the beginning. Use FTP to access the directory which houses both index.php, /wp-admin/, /wp-content/, etc. If there is a .htaccess file there, set its permissions to 666 (CHMOD 666). More info: http://codex.wordpress.org/Changing_File_Permissions

    Now, go to Options/Permalinks. Let the category base blank and enter this (and only this) in the structure field:
    /%year%/%monthnum%/%day%/%postname%/

    Now, hit the update button. If you correctly set .htaccess' permissions to 666, there should be no rewrite rules to enter. WordPress should have automatically updated the .htaccess file for you.

    If you were entering the rewrite rules into any .htaccess file other than the one mentioned above, delete them now. They are in the wrong .htaccess file and probably the source of all these problems. Now, before continuing, please re-read this post starting from "Let's start from the beginning." Once you have finished that, you may begin.

  9. aimbright
    Member
    Posted 9 years ago #


  10. aimbright
    Member
    Posted 9 years ago #

    My htaccess file is in my root directory ... it's the only one. I don't allow wp to write to it ... instead I enter the structure and wp gives me the code which I copy and paste into htaccess.

    I cannot delete my htacces file in the root directory ... it has commands much more than wp to run other apps.

    Do you mean I need an htaccess file in every wp directory?

    I know sp 1.2 allows commands like http://garden-decor.us/?cat=1 and http://garden-decor.us/?m=200508 but wp 1.5 and above does the subdirectory thing which doesn't work

    I'm telling you /%year%/%monthnum%/%day%/%postname%/
    does not work.

    Please help.

  11. That's the problem. The .htaccess file for WordPress (and WordPress' permalink rewrite rules) needs to be in the directory that houses index.php and wp-rss2.php. So, if your blog is installed at yourdomain.com/wordpress/index.php, the the .htaccess file for WordPress (and WordPress' permalink rewrite rules) needs to be in /wordpress/.

  12. acousticdryad
    Member
    Posted 9 years ago #

    I am attempting to solve the same issue. I've emailed my host to see if they have mod_rewrite, but I'm pretty sure they do. My "Pages" work fine, it's just my archives that are giving me troubles by saying they aren't there.
    http://acoustic-dream.com/vault/

    And yeah I have the .htaccess in the required folder.

  13. acousticdryad
    Member
    Posted 9 years ago #

    I checked with my host and they do have mod_rewrite. Still unsure why these aren't working.

  14. jamesdfym
    Member
    Posted 8 years ago #

    Don't know if this is any help, but I was having the same problem after moving from Blogger to WP. For some reason I had a set of folders in my directory which were the same as the permalink structure. They contained html files of all the posts but no archive index pages, so obviously the browser was looking for index.html and getting the 404 error. Once I deleted the folders everything was OK.

Topic Closed

This topic has been closed to new replies.

About this Topic