• Resolved mygermanrecipes

    (@mygermanrecipes)


    I recently switched to SSL and as it turns out, the internal links on my blog don’t work anymore. The slash / after the domain name mygerman.recipes is missing in the internal links in the posts and also in the picture urls in posts. Oddly, the images are still shown in the posts for visitors. The internal links, however, don’t work.
    I need to understand why that happened and how I can fix the problem.
    I don’t want to create redirects though.
    Can anyone help me with this problem?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Mark

    (@markwolters)

    Hi @mygermanrecipes,

    your site does seem to be working fine currently. Do you still experience any issues? If so, what redirect option have you enabled in the plugin?

    Thread Starter mygermanrecipes

    (@mygermanrecipes)

    Hi,
    you probably misunderstood:
    The Website is up and working but within the posts, the internal links broke. All of them.
    Example:
    Lets look at the post https://mygerman.recipes/spritz-cookies-the-best-recipe/

    The internal link to “Cookies” should be
    https://mygerman.recipes/speculaas-cookies-cream-filling-spekulatius-oreos/
    but is is now
    https://mygerman.recipesspeculaas-cookies-cream-filling-spekulatius-oreos/
    so, the / behind the domain name is missing.
    The same applies to all pictures and the fact that they are still showing is probably attributed to the Smush plugin.

    The picture
    https://mygerman.recipes/wp-content/uploads/2020/12/small-Spritzcookies-2.jpg
    has now the url
    https://mygerman.recipeswp-content/uploads/2020/12/small-Spritzcookies-2.jpg
    so here the / after the domain name is missing, too. This applies to all images in the posts except for the featured image.

    I am not using any redirect plugin.

    I don’t know how this happened or how to fix it. Can you please help me?

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    We didn’t make any changes that could cause this. What is the content of your .htaccess currently? You could try removing all .htaccess rules except the default WordPress lines (which are within the #WordPress comments). Then re-save the permalinks to rewrite the WP rules in settings/permalinks.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Looking at the website, and your examples, this seems to be resolved. Let me know if you have any questions.

    Hi there,

    I am having this issue as well and have been trying to change them manually but that is literally thousands of links. Can I ask how you fixed this?

    Hi, I’ve been having a similar problem myself. I’m going to go ahead and try fixing things manually but I’d like to know for future reference what the resolution to this issue is. I’m not sure I understand how to implement @rogierlankhorst’s solution of re-saving the permalinks to rewrite the WP rules. Elsewhere on the web I saw a suggestion to change the .htaccess file as shown below (all but last five lines are the original file; last five lines were added to original file), but this didn’t seem to affect anything; I’m guessing it was only for directories. Could you help me understand how I could fix this issue?

    Thanks in advance, Brian

    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access plus 24 hours”
    ExpiresByType image/jpeg “access plus 24 hours”
    ExpiresByType image/gif “access plus 24 hours”
    ExpiresByType image/png “access plus 24 hours”
    ExpiresByType text/css “access plus 24 hours”
    ExpiresByType application/pdf “access plus 1 week”
    ExpiresByType text/javascript “access plus 24 hours”
    ExpiresByType text/html “access plus 5 minutes”
    ExpiresByType image/x-icon “access plus 1 year”
    ExpiresDefault “access plus 24 hours”
    </IfModule>
    <ifModule mod_headers.c>
    Header set X-Endurance-Cache-Level “2”
    </ifModule>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    # php — BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php73” package as the default “PHP” programming language.
    <IfModule mime_module>
    AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
    </IfModule>
    # php — END cPanel-generated handler, do not edit

    # Force trailing slash
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_URI} /+[^\.]+$
    RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
    </IfModule>

    Plugin Author Mark

    (@markwolters)

    Hi @bfh529,

    the permalinks can be re-saved in the Settings->Permalinks section. You can leave it as is and press the ‘Save’ button. That will resave the permalinks. Could you try if that solves the issue?

    Hi @markwolters,

    I went into Settings->Permalinks and pressed save. I also tried removing the last few lines from the .htaccess code that I mentioned in my previous post, went back to Settings->Permalinks, and pressed save again. Neither time seemed to have any effect.

    Plugin Author Mark

    (@markwolters)

    Hi @bfh529,

    could you provide us with your site address so we can have a look?

    My site is gmatmath.online. I should mention that not all of the links have the problem, and I have corrected several of them manually. Most of the images on the secondary pages, however, have omitted the slash between the domain name and the rest of the directory path to the image filename, leading to an error when clicked upon. Some links have the problem too. The error manifests itself in the html in the values for “href” and “src”.

    Thanks in advance for your efforts and help, Brian

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    What is your site url in settings/general? Is it with a slash?

    Do you have only php redirect or also php redirect enabled?

    Do you have custom code in the htaccess file (please post it here so we can check)

    The site URL in settings/general is without a slash. Every time I’ve tried to save it with a slash, it gets taken off automatically.

    I don’t know about PHP redirect. I may have it, but I’m not sure. I don’t know where to check that on my WP dashboard. Is there a plugin associated with that? If so, I don’t see it in my list of enabled plugins.

    I put the entire contents of the .htaccess file in my initial post above. The last five lines (also in that code above) I had added in an attempt to solve the problem, but it didn’t help. I saw it suggested on another forum; I think it’s supposed to do it for directories, but I guess not for domains.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    The htaccess looks fine. The php/wp redirect is the default redirect in settings/ssl. You can try to disable it, to see if it makes a difference.

    To check if it is caused by anything the plugin does, you can deactivate the plugin, then choose to keep https.

    I can’t think of anything this plugin does that could cause this, so I would also try to deactivate your other plugins one by one.

    I’m sorry, perhaps I’m in the wrong place. I’m new to the WordPress forums; I came here because I was having the issue described above and I couldn’t find help anywhere else. It didn’t occur to me that this was a thread dedicated to this particular plugin (“Really Simple SSL”), which I’ve never had. So this plugin obviously isn’t causing the problem.

    I don’t appear to have an “SSL” option in Settings. Does that come with this plugin?

    I’m a bit hesitant about deactivating the other plugins one-by-one, because I’m afraid that might foul up my site. Or is this just an irrational fear of mine?

    I’m not sure it’s a plugin issue because I hadn’t added any plugins recently before the problem occurred. Possibly one of them auto-updated, although there’s only a couple that do; maybe it’s one of those. Is there another place you would recommend I look for help? Should I make a new post in the general forum?

    Fortunately, the problem isn’t too urgent; if no solution can be found I may just fix each individual link manually.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    As this is the Really Simple SSL forum, we’ve been working on the assumption that a switch to ssl caused this.

    When did this problem start then? What did you change?

    It sounds as if this was a search replace/ site migration with a mistake/typo in the replace. If the site was migrated from domain1.com/ to domain2.com for example, or a search replace was done with a missing slash.

    If fixing manually resolves it, it has nothing to do with the htaccess.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘After switching to SSL the “/” after domain name in internal links is missing’ is closed to new replies.