WordPress.org

Forums

Permalinks Not Working - Please Help (23 posts)

  1. briggszilla
    Member
    Posted 7 years ago #

    I don't understand what the hell I am doing wrong here. This is the fourth website of mine this has happened to, the other times I had to pay somebody to fix it for me but now I just want to learn what I'm doing wrong and how to fix it myself.

    The problem: When I click on a post title on my homepage (blog is installed directly on the home site), instead of displaying only that single post, it merely refreshed the page and displays all posts. So, should somebody read one of my posts and want to link to it, the direct link would bring up all posts instead of that single one.

    Another problem this creates is when you click on "comments" to read/write a comment, it does the same thing: refreshes the homepage rather than just bringing you to the single post.

    Other things to note: In the past, I suspected this happened when I changed the permalink structure. Often I would create a blog and then forget at first to use the "pretty urls" so then I would go back in and change it, soon after I noticed the problem.

    However, this is a brand new blog. I changed the permalink structure before I ever posted on it.

    Another problem I had with other blogs was that the RSS feed also somehow got messed up along with the permalinks. Same deal this time.

    I had posted for help here months ago when I first began having these issues only to get a reply about checking my htaccess file. Okay. But WHAT am I looking for specifically?

    I'm not familiar with modifying such things, I don't know what to look for, but I know that if somebody could give me more of an idea what is normal, what isn't normal for htaccess, and hopefully a step-by-step resolution...I am confident that I could fix it myself. I just need to know WHY this is happening?!

    So frustrated! Please help!

  2. Roy
    Member
    Posted 7 years ago #

    It seems to me that you don't have a single.php.

  3. WildBil2Me
    Member
    Posted 7 years ago #

    Can you provide a link to where this is actually happening?

    It sounds to me like there's a 404 happening. If you don't have a proper 404.php setup sometimes when it hits a bad URL WordPress will display what looks like the homepage instead. I've had this happen recently on two themes I was developing.

    You can test if it's returning a 404 by just adding a blank 404.php file to your theme. Once that's done click through to a post - if a blank page appears then that's what's happening.

    Now - if it's a 404 then we talk .htaccess. If it's not a 404 there are a few other things we can try.

  4. Roy
    Member
    Posted 7 years ago #

    allerjeez.com Works fine (IE7), but what you describe sounds more like a missing single.php to me. Indeed, some more info please (link, check if you have a single.php on your server).

  5. briggszilla
    Member
    Posted 7 years ago #

    Wildbil2me and Gangleri,

    Thank you for responding.

    I have just checked my files and there are both 404.php and single.php files in there. This has happened as I've said, several times, and I suppose I might want to mention on several different templates. It must be something that I'm personally doing wrong, although I don't quite understand what it is! With Allerjeez.com, I thought it might have had something to do with how much I was messing around with things in there, changing around plugins, editing the coding on the layout, etc.

    Though with this brand new blog I haven't done anything other than install it, change the widgets around and change the permalinks to pretty permalinks! I'm certain it's not something that happened during install...

    The new blog is celebriteasing.com

    Thanks!

  6. moshu
    Member
    Posted 7 years ago #

    Then back to the basics:
    Does your server/host have all the requirements for Using_Permalinks?

    (and just for the record: a missing template file, like single.php will NEVER cause a 404. However says that should read about Template_Hierarchy.)

  7. Roy
    Member
    Posted 7 years ago #

    Moshu, there was no 404, that was a suggestion of WildBil

    When I click on a post title on my homepage (blog is installed directly on the home site), instead of displaying only that single post, it merely refreshed the page and displays all posts.

    I stick to my argument that this happens when WP tries to display a single post, but can't find the single.php and uses the index.php instead. On the other hand, maybe indeed WP is a bit messed up since it 'doesn't understand' the new permalinks.
    In any case, briggszilla check out Moshu's permalinks link and see if you have all the requirements and/or post the content of your single.php.

  8. Roy
    Member
    Posted 7 years ago #

    Hm, a nice suggestion here. Could it be that it has something to with with your www domain and non-www links in WP?
    Oh and in repeat: http://www.allerjeez.com works just fine. Is it this domain you are talking about?

  9. justinratwebtek
    Member
    Posted 7 years ago #

    If it was a single.php issue, switching to the Classic/Default templates would fix it. I personally get a weird .htaccess vibe from this.

    Are you using the WP standard .htaccess file or has it been edited?

  10. whooami
    Member
    Posted 7 years ago #

    I have to concur with Gangleri -- other than the anchor for your comments link needing to be tweaked, there is nothing wrong with the blog in your profile.

    if its another blog url, it might help to share it.

    unlike some, I try not to speak before seeing things for myself.

  11. justinratwebtek
    Member
    Posted 7 years ago #

    Took me a little bit to find it in all the comments:

    celebriteasing.com

  12. whooami
    Member
    Posted 7 years ago #

    thank you!

    everything I checked goes back to your index.php, its not just what you mentioned.

    Paste what is inside your .htaccess here:

    http://wordpress.pastebin.ca/

    and you are enforcing the no-www also, is that via a plugin or ..?

  13. WildBil2Me
    Member
    Posted 7 years ago #

    moshu and Gangleri: If the permalink structure wasn't working properly clicking a bad permalink would generate a 404.

    Point your browsers to the site using celbriteasing.com/xyz.html and you'll see what I mean. There should be a 404 generated instead we're seeing what looks like the index file again.

    For some reason the server is pushing this template file for everything that's called. Add a comment flag (<!-- this is the index.php file -->) somewhere on index.php and we'll probably see that index.php is the file that's being used.

    At this point I think whooami's right - we need to look at the .htaccess file.

    Gangleri: remove the single.php file from the default theme and reload your blog. It will still work and display only one post - not a full list. You can actually build a pretty functional theme without ever creating a single.php.

  14. moshu
    Member
    Posted 7 years ago #

    If the permalink structure wasn't working properly clicking a bad permalink would generate a 404.

    Not necessarily! If your theme doesn't have a 404.php file - in most of the cases it takes you back to the main index. Don't ask me why (although somewhere it has been explained in the forum by more knowledgeable coders)... all I remember was something that WP's rewrite rules are "greedy" :)

  15. WildBil2Me
    Member
    Posted 7 years ago #

    I think my terminology may be a bit off. :-)

    We now know there's a 404.php file and we should be seeing it when a non-existing file is called or a bad permalink is used.

    Since we're not seeing it, and everything seems to be falling back to the main index, it's probably an example of the rewrite rules being "greedy" - which I think is the perfect way to describe it.

  16. whooami
    Member
    Posted 7 years ago #

    and all of this, and you STILL havent pasted the contents of your htaccess anywhere. Why are you debating linguistics? Cut to the chase, please.

  17. moshu
    Member
    Posted 7 years ago #

    Well, the OP is gone for the last day or so...

  18. briggszilla
    Member
    Posted 7 years ago #

    I'm here! Thank you thank you very much for sticking around here and discussing this. I'm going to go through all of this and let you know what happens next.

  19. briggszilla
    Member
    Posted 7 years ago #

    Okay here we go.

    moshu - "Does your server/host have all the requirements for Using_Permalinks?" - I would imagine so, I have a few other blogs hosted with the same service (ex: AllerJeez.com) and the person who fixed it before was able to somehow. So I suppose my answer to this is yes, right?

    Gangleri - "Hm, a nice suggestion here." - very interesting, looks like the did have the same problem! However, WP on celebriteasing.com is installed directly on the root of the site. I did however go into my WP options to check if the address was right, and it was. For kicks, I even added www in front of celebriteasing.com, tested it, still nothing.

    And yes, AllerJeez.com is one of the blogs this happened to before, however I had somebody else fix it for me.

    justinratwebtek - "If it was a single.php issue..." - This is actually the very first thing I did when this happened months ago on my AllerJeez blog. Didn't resolve anything, and I'm assuming it wouldn't do any good in this case either.

    I have not touched my .htaccess file. I know nothing about it so I've left it alone.

    whooami - "Paste what is inside your .htaccess here:" - The page wouldn't come up for me. I don't even know what "no www" is, but I know that I don't have a plugin for it. It's a brand new blog and I've only installed 2 plugins (one of which I'm not even using yet).

    "STILL havent pasted the contents of your htaccess anywhere." - here you go:

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

    # END WordPress

  20. briggszilla
    Member
    Posted 7 years ago #

    Bump?

  21. justinratwebtek
    Member
    Posted 7 years ago #

    Actually, I had a client this weekend that emailed me with the exact situation. We thought it was the htaccess as well.

    It was actually a plugin: Permalinks plugin

    If you're using it, deactivate and try everything out.

  22. briggszilla
    Member
    Posted 7 years ago #

    The only plugins I have are:

    Akismet - activated
    flickrRSS - deactivated
    Gravatar - activated
    Hello Dolly - deactivated
    WP Database Backup - activated

    The only ones I had in common on other sites this happened to were Akismet and WP Database...so if a plugin is the culprit it has to be one of those two...

  23. briggszilla
    Member
    Posted 7 years ago #

    Well, it appears as though changing the permalink structure to default solved the problem. Which is strange, because during the summer when AllerJeez had this problem, that was the first thing I tried to do to fix it. Hmmm.

    Though I am relieved that it's now working properly, I'm also disappointed that this was the problem, since I wanted the pretty urls for SEO purposes. What to do now? Perhaps this has something to do with my hosting/server as moshu suggested way above? Unless anybody has any other ideas, maybe I'll take up an account with another hosting company.

Topic Closed

This topic has been closed to new replies.

About this Topic