WordPress.org

Ready to get started?Download WordPress

Forums

cannot see posts (10 posts)

  1. Famous
    Member
    Posted 2 years ago #

    I have a Lion install with native PHP & Apache, and I installed MySQL on my own.

    I cannot see posts - only?
    http://localhost/AAA/mySite/2012/06/post-title/

    I can hit the homepage fine, but cannot see posts
    http://localhost/AAA/mySite/ <<<<<< hits fine

    I can also login to my admin, but its a no go on the posts - any ideas?

    Thanks

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Is mod_rewrite running on your server?

  3. Famous
    Member
    Posted 2 years ago #

    So the below is what the Apache httpd file looks like:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  4. Famous
    Member
    Posted 2 years ago #

    By the way I just realized my:
    http://localhost/blog/2012/06/16/hello-world/

    works!

    but:

    http://localhost/AAA/mySite/

    doesn't work. It redirects to the localhost site as a 404 not found

  5. loughcorrib
    Member
    Posted 2 years ago #

    Have a look at .htaccess rewrite.
    What permalink structure are you using ?

  6. Famous
    Member
    Posted 2 years ago #

    I meant to say this one doesn't work:
    http://localhost/AAA/mySite/2012/06/post-title/

    this one does:
    http://localhost/AAA/mySite/

    The .htaccess is below, I took out three lines to fit the code guideline of 10 lines

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
  7. Famous
    Member
    Posted 2 years ago #

    My localhost site shows /blog/2012/06/16/hello-world/, but my directory site won't.

    Here is the .htaccess file for the directory site:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    thanks for your help

  8. loughcorrib
    Member
    Posted 2 years ago #

    As per Esmi is rewrite on?
    Also what have you set in permalinks ?
    The code rewrite above just removes index.php from permalink.
    Any chance you have reversed date and title have you this in permalink.

    /%date%/%post%/
    or similar

    What is your url ??On pc 127 or local ?

  9. Famous
    Member
    Posted 2 years ago #

    thanks for the follow through loughcorrib. I looked at this page:
    options-permalink.php

    and at the bottom of the page found this:
    If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.

    Copied the code that it had in the box below it and pasted it to the .htaccess file and now it works great.

    Thanks

  10. loughcorrib
    Member
    Posted 2 years ago #

    Great ! glad you got sorted.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags