WordPress.org

Ready to get started?Download WordPress

Forums

Search By Full Title Yields No Results But Keywords Do (3 posts)

  1. WordWeaver777
    Member
    Posted 3 years ago #

    Hello,

    For some reason, previously, under my old server software -- WebSTAR -- I wasn't able to use pretty links, and I was forced to use the "disable-canonical-redirects" plug-in as well. However, since upgrading my server software to Apache 2.x, as well as upgrading both PHP and mySQL to recent versions several days ago, I am able to use pretty links, and I no longer need the aforementioned plug-in. I am using WP 3.2.1 on a Macintosh G4 mini-tower running Tiger 10.4.11 PPC.

    However, there is a problem.

    If I use the built-in search engine to search for a post by its actual full title, the search engine yields no results and I get the "nothing found" message. However, if I search for a few of the key words that I know are in the post title, the post does appear in the search results.

    I am currently using pretty links in the format "yyyy/mm/dd/post-title-goes-here/".

    But what has me particularly concerned is the fact that this problem is resulting in the Google spider receiving a lot of 404 errors when it makes a request for a URL such as:

    http://www.endtimeprophecy.net/Blog/2011/01/11/suicide-bomb-blast-in-alexandria-egypt/

    Obviously, this has to be hurting my Google PageRank.

    On the other hand, if I use that same link above after clearing my web browser's cache, it has no problem taking me to that same page.

    I have a question/theory. Are all previous posts stored in the mySQL database using the former link format -- that is, the default "?p=123" -- and now that I am using pretty links, that is why my searches -- and Google -- can't find these posts by their full titles?

    If this is the problem -- theoretically-speaking -- is there some way to update the stored posts so that they convert to the pretty links?

    BTW, I did use phpMyAdmin to verify that all of the wordpress tables are okay, and it reported no errors in the database.

  2. WordWeaver777
    Member
    Posted 3 years ago #

    Just an update to let everyone know that my problem appears to have been resolved.

    What happened is that yesterday when I reinstalled WP Super Cache, I messed up the rewrite rules that are in the htaccess file for my blog's root directory. This apparently broke the redirects.

    Now that I have fixed the htaccess file, the Googlebot is no longer getting 404's when it makes requests using pretty links, and I now get the right search results when I use a full post title in WP's search engine.

  3. WordWeaver777
    Member
    Posted 3 years ago #

    I just wanted to clarify what I wrote in my previous message, for the sake of those of you who may be experiencing similar 404 problems as a result of not having WP Super Cache properly configured.

    My experience is that installing WP Super Cache can be a bit confusing if you are not familiar with it, or with .htaccess files. It took me a day to figure out what I was doing wrong, which was resulting in a lot of 404 errors with the Googlebot.

    Basically, BEFORE you hit the "Update Mod_Rewrite Rules" button on the "Advanced" tab of the "WP Super Cache Settings" page in WP, you need to do this:

    1. Make sure there is an .htaccess file at the top level of your blog, that is, in your blog's root directory.

    2. Make sure there is also an .htaccess file in "wp-content/cache/"

    3. If a .htaccess file does not exist in either one of these two places -- they are normally invisible -- you can make them yourself in the Terminal.

    4. Using the Terminal, cd to the directory where the .htaccess file needs to be created.

    5. Type "sudo pico .htaccess" to create the file.

    6. Enter your admin password when requested.

    7. Save the newly-created .htaccess file.

    8. Once you are sure that these two .htaccess files exist, you need to open the one that is located in "wp-content/cache" and add the following rule to it:

    # BEGIN WordPress
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    9. Save the edited .htaccess file.

    10. At this point, I advise you to reboot your server just to play it safe.

    11. Once you have rebooted your server, go back to the "Advanced" tab of the "WP Super Cache Settings" page and hit the "Update Mod_Rewrite Rules" button. WP Super Cache will then inform you that it has added the necessary rewrite rules to both of the aforementioned .htaccess files.

    12. You should now be good to go. You can go to the "Contents" tab and click on the link there in order to see exactly what WP Super Cache is doing for you insofar as caching is concerned.

    I hope this little tutorial helps some of you.

Topic Closed

This topic has been closed to new replies.

About this Topic