• Resolved xonline

    (@xonline)


    Hi, I am trying to use your permalink helper having discovered I have over 100 mis-directed old permalinks. (woops!!!!)

    I moved from month and name to /%postname%/

    However having put the settings into the permalink-helper it generated this

    RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(?!page/)(.+)$ https://www.mywebsite.co.uk/$3

    The problem is that the new permalinks now all end .html/ whereas the actual post name does not contain .html.

    So I end up with https://www.mysite.co.uk/actual-post-name.html/ instead of https://www.mysite.co.uk/actual-post-name/

    Is there a way to hack this redirect so that the .html is missing?

    Many thanks

    Phil

    • This topic was modified 7 years, 1 month ago by xonline.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Phil,

    We are not sure if there is a way to do that. We suspect you may need to enter some additional rules to drop the .html via one final redirect from https://www.mysite.co.uk/actual-post-name.html/ to then https://www.mysite.co.uk/actual-post-name/.

    However, we are unable to provide custom code or advice on how to make such changes as we may provide incomplete code which may break your site. The only solution we can offer is to experiment with different rules. You may need to speak with your host provide to get some additional information on what other rule (or rules) needs to be added into the server.

    There is also this tool here which can be utilized to help build test, and expand on rules here: https://regexr.com/. You may need to use that tool to continue to experiment with how to drop that .html from those links to make that final redirect.

    Thread Starter xonline

    (@xonline)

    ok I understand the point about custom code Costa, – but am I the only person who has this problem with the perma-link helper?

    I thought I was only trying to use your permalink-helper in the way it was intended. I followed the instructions and it did break my site, creating ‘500’ errors. It was then I realised the .html problem and removed the code that the permalink-helper produced from my .htaccess.

    The problem, seems to be that either
    1) the permalink-helper does not do quite what is expected of it.
    or
    2) you are saying that if you are using %%postname%% it normally appends .html (and is my site in some way an exception in losing it).

    I don’t want custom help, but knowing whether I have messed up in some unique way would be useful.

    Thanks

    Hi,

    The permalink helper tool is not expected to add .html to the end of a url. That .html is expected to come from your server or another plugin or theme which is appending .html to it. We would like some more information.
    –Did your site at some point in the past ever have .html?
    –Do the mis-directed permalinks have .html at the end?
    –Can you take a screenshot of the issue or mis-directed permalinks? To then share it to the forum you can use an image sharing tool like https://pasteboard.co/.
    –Are you trying to use the permalink helper tool to redirect those mis-redirects to the right post/page? OR are you trying to use that permalink helper tool to force those mis-redirects to have the right permalink structure?
    –Can you provide some urls which highlight the issue?

    We ask as if you are trying to redirect urls, the permalink helper tool may not be the right tool to use.

    Plugin Support Jerlyn

    (@jerparx)

    Closed due to inactivity.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘permalink-helper for redirects appends .html to post name’ is closed to new replies.