WordPress.org

Ready to get started?Download WordPress

Forums

New WP 1.2.1 Install - No "Archives" & 404 Error (22 posts)

  1. JoshuaNewman
    Member
    Posted 9 years ago #

    Hi -
    I'm new to WordPress and just installed it last night. The hosting service seems to have all the basic requirements met, and said that mod_rewrite was enabled. Installation succeeded and I can create users and post.
    I installed WordPress into a directory called "wp" immediately below my "public_html" directory.
    But I don't have an "archives" directory under my "wp" directory, and if I use < !--more-- > in a post, or if I click on the archives calendar thingie when viewing the blog, I get 404'd.
    I have edited .htaccess to change RewriteBase (changed "/wp" to "/public_html/wp/") but this does not solve the problem.
    Any help would be welcome. I'm not php-savvy at all.
    Kind regards,
    Joshua Newman

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

    Change this:
    /public_html/wp
    to this
    /wp/
    and see what happens ?

  3. JoshuaNewman
    Member
    Posted 9 years ago #

    Hi - thanks for the reply.
    I see I made a typo in my original post. There was a trailing "/" character terminating the RewriteBase line.
    Anyway - I did change /public_html/wp/ to /wp/ but it did not resolve the problem.
    Kind regards,
    Joshua Newman

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Okay...
    Now to query the server and see what it says about mod_rewrite:
    Paste this into a new Notepad / BBEdit file
    <?php phpinfo(); ?>
    Save as 'info.php'
    Upload to server. Visit in your browser (www.example.com/info.php)
    That will give you info about your php version and mod_rewrite.

  5. JoshuaNewman
    Member
    Posted 9 years ago #

    Hi -
    The php version is 4.3.9 and the apache version is 1.3.31 with mod_rewrite loaded.
    Should the installation of WordPress have created a directory underneath its own called "archives" or maybe "wp-archives"-- like this:
    /wp/wp-archives/
    Because there was no such directory created by the installation. Should I create one?
    Kind regards,
    Joshua Newman

  6. moshu
    Member
    Posted 9 years ago #

    You do not need to create "archives" directory! Those (like the category as well) are kinda "virtual" directories, created by the rewrite rules - if they are set up correctly :)

  7. Mark (podz)
    Support Maven
    Posted 9 years ago #

    No - everything after the /wp is a 'virtual directory'
    Try this at the top of your .htaccess
    Options FollowSymLinks

  8. moshu
    Member
    Posted 9 years ago #

    How did you you set up your "virtual site structure"? i.e. what template tags did you put in the permalink options page?
    (e.g. mine is - /archives/%year%/%monthnum%/%day%/%postname%/)

  9. JoshuaNewman
    Member
    Posted 9 years ago #

    Hi -
    Moshu, my template tags are identical to yours:
    /archives/%year%/%monthnum%/%day%/%postname%/
    Seems like a sensible structure.
    podz, I tried putting the line Options FollowSymLinks (cut and pasted from your message) at the top of .htaccess, but it did not solve the problem.
    Kind regards,
    Joshua Newman

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

    You shouldn't need the 'public_html'
    That 'directory' is a server-side thing that means nothing to a browser or to rewrite rules. (I know it's called something more complex that 'thing', but I know you can also ignore if from this side of the website.)
    Have you installed into just the one directory ?
    Are you just using notepad and ftp to upload the .htaccess ?

  11. JoshuaNewman
    Member
    Posted 9 years ago #

    Hi podz -
    I'll try putting up the .htaccess again, but yes, just a pure ASCII editor and ftp. Maybe it's corrupt.
    At this point I'm thinking of just saving the source of the two or three entries I've published, tearing WP out, deleting its database, and installing it again from scratch.
    Would that make sense, or should I keep trying to troubleshoot the current installation?
    Kind regards,
    Joshua

  12. Mark (podz)
    Support Maven
    Posted 9 years ago #

    If wp is working, I'd leave it.
    Does your host have any forums where you can search for any .htaccess issues ?
    Who is your host ? Just in case someone here has the same and could advise.

  13. JoshuaNewman
    Member
    Posted 9 years ago #

    Hi -
    The host is midphase.com, and although there is a lot about them to like, unfortunately, their forums are not their strongest feature. I'm going to post there, though, in case someone's seen this issue before.
    WP is working, but without the categories, < -- more -- >, and permalinks at present. It's not critical that it be ready for production this week, but that would be nice. Everything about it I like, so far, except this glitch.
    Kind regards,
    Joshua

  14. JoshuaNewman
    Member
    Posted 9 years ago #

    Just re-created .htaccess by going into Options / Permalinks and copying and pasting the mod_rewrite rules from the bottom of the page (after updating my permalink structure)
    Which part of the host's directory structure should .htaccess live in?
    I'm guessing it should be in the same directory in which WP is installed (for me, that's the /public_html/wp directory) -- is that correct?
    Kind regards,
    Joshua

  15. Mark (podz)
    Support Maven
    Posted 9 years ago #

    yup.

  16. JoshuaNewman
    Member
    Posted 9 years ago #

    OK. I put .htaccess in /wp (which was clearly part of the problem; I hadn't understood properly that this file controls access to the directory in which it resides, and thought it was global -- it hurts sometimes to be new!).
    Part of the problem is now gone: The categories work properly and do not give 404 errors when clicked.
    The permalinks are still broken, though.
    This is the case whether or not .htaccess contains "Options FollowSymLinks" (without quotes marks) as its first line.
    Kind regards,
    Joshua

  17. JoshuaNewman
    Member
    Posted 9 years ago #

    Ohh ... I am a happy fellow!
    Just edited my posts and saved them again. And by the LAMP, those symbolic links? They're being followed.
    Lo!
    It works!
    And other expressions of joy and glee.
    Thank you all!

    To sum up my errors, then, for anyone who does the same silly things:
    .htaccess needs to be in the same directory that WP is installed in. If you mess up initially, editing and saving your posts again (after fixing the problem by fixing .htaccess and putting it in the right place) cures the broken-permalink problem.

    Kind regards,
    Joshua

  18. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Excellent :)

  19. ColourDreamer
    Member
    Posted 9 years ago #

    I had this problem because I had a structure in the permalink thing that it did not like.

  20. Anonymous
    Unregistered
    Posted 9 years ago #

    I am using this structure:
    \/archives/%year%/%monthnum%/%post_id%\
    and the generated rewrite rules, which don't work:
    RewriteEngine On
    RewriteBase /wptest/
    RewriteRule ^archives/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wptest/wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/category/?(.*) /wptest/index.php?category_name=$1 [QSA]
    RewriteRule ^archives/author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wptest/wp-feed.php?author_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/author/?(.*) /wptest/index.php?author_name=$1 [QSA]
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]+)?([0-9]+)?/?$ /wptest/index.php?year=$1&monthnum=$2&p=$3&page=$4 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]+)?/(feed|rdf|rss|rss2|atom)/?$ /wptest/wp-feed.php?year=$1&monthnum=$2&p=$3&feed=$4 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]+)?/trackback/?$ /wptest/wp-trackback.php?year=$1&monthnum=$2&p=$3 [QSA]
    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wptest/wp-feed.php?feed=$1 [QSA]
    RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wptest/wp-feed.php?feed=$1&withcomments=1 [QSA]
    Any ideas

  21. Anonymous
    Unregistered
    Posted 9 years ago #

    oops, that is just /archives not the backticks

  22. First, can we have a link to your site, please? Second, try:
    /archives/%year%/%monthnum%/%day%/%postname%/
    Then, delete the ReWrite rules that were originally in .htaccess, and copy over the new ones. If that doesn't work, try /index.php/ in front of your permalink structure. If that doesn't work, see: http://faq.wordpress.net/view.php?p=20

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.