• I am using a customized version of TwentyTen 4.1.1 version. You can behold its glory here: https://www.thelanternlight.com/blog

    I’ll get right to it. My site functioned just fine as you see it now right up until I updated my htaccess file. Firstly, as you can see, I have buttons to direct visitors towards previous posts at the top and bottom of the blog. Currently if you click those buttons you get an error page. Interestingly (and presumably relatedly) if you click any of the images you get the same error page. Again, prior to updating the htaccess file everything worked fine.

    So, when I updated the htaccess file this is what the file included (nothing more, nothing less):

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^https://(www\.)?thelanternlight.com/.*$ [NC]
    RewriteRule \.(gif|jpg|png|jpeg|mp4|mp3|wav)$ https://33.media.tumblr.com/e050dda5f26c2bfd69e09c953b0943ac/tumblr_nmcff0TyGs1us815do1_400.gif [R,L]

    ErrorDocument 400 /400.shtml
    ErrorDocument 401 /401.shtml
    ErrorDocument 403 /403.shtml
    ErrorDocument 404 /404.shtml
    ErrorDocument 500 /500.shtml

    As you can see, this htaccess file provided two features. The first is a hotlink protection. The second is a customized error page.

    I have currently deleted all my htaccess files. All of them. However, even without the htaccess file on my server the problem persists. If I click on the previous posts button on my wordpress blog or indeed on any of the images on my blog I get an error page.

    Is there any way to fix this? Or even better, in an ideal world, could I keep my htaccess so that people don’t hotlink me and I can have customized error pages AND be able to click the images/previous and next posts buttons???

    Any help is GREATLY appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Go to the WordPress dashboard Settings >> Permalinks >> [make sure “Post Name” is selected] >> Save

    This will regenerate your .htaccess file with your pretty permalink rules:

    #Begin WordPress
    
    rewrite rules
    
    #End WordPress

    Now check your previous/next buttons, which should be functioning again. Assuming all is well, you can copy in your existing custom rules (hotlinking and error docs) to finish 2 lines above #Begin WordPress

    Thread Starter Merboy

    (@merboy)

    It worked! Ahhhhhh I can’t thank you enough!!!!!! Thank you, thank you, thank you times a billion!!!! The only thing now is that the images still don’t show up when you click them but I might be able to figure that out. I’m just SO happy that the buttons work again! Thank you so much!!!!! Here is a check for a BILLION internets!!!!

    Thread Starter Merboy

    (@merboy)

    Okay, so,

    1. the back/forward buttons work fine now.
    2. the hotlinking prevention and error pages work fine.

    But what could be causing my images to become broken links? I would think that would have been fixed along with the permalinks settings.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The previous/next posts feature’ is closed to new replies.