• Hello,

    From some reason my wordpress page does not throw 404 error for URLs with extra characters. So for example the URL: https://exmaple.com/my-awesome-article will display when accessed via all below URLs:

    https://exmaple.com/my-awesome-article- ( note the trailing - )
    https://exmaple.com/-my-awesome-article ( note the leading - )
    https://exmaple.com/my-awesome.article ( note the . instead of - )
    https://exmaple.com/my-awesome-article, ( note the trailing , )

    the list goes on and on.

    My permalinks settings are configured with /%postname% . Can somebody please provide me with some hints on how to troubleshoot this issue. For now I’m using nginx rewrite to URLs to a correct structure but the list just keeps growing and need some long term solution.

    Your help is mush appreciated.

    thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @lubosr,

    Your Nginx rewrite rules looks like this?

    location / {
      try_files $uri $uri/ /index.php?$args;
    }

    https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress

    Thread Starter lubosr

    (@lubosr)

    Hi Cereno,

    Not exactly, nginx does not have the “/” location defined. However I have the following:

    location /index.php {
       rewrite ^/index\.php /$1 redirect;
    }

    What I’m looking for? Do you suggest to change to the:

    location / {
      try_files $uri $uri/ /index.php?$args;
    }

    thank you

    Hi @lubosr – Yes, I suggest to follow the setting on that Nginx documents to see if it solves this issue.

    Thread Starter lubosr

    (@lubosr)

    Hello,

    I was still unable to fix the issue. Here is more information. The website is served via nginx proxy but the installation is on apache2. First I thought that the issue is with nginx but after few tests when bypassing the nginx the apache server seems to be the issue. My apologies for the confusion!

    Here is what I have tried:

    1. changed permalinks and the issue is also with other permalinks formats
    2. disabled all plugins but no help
    3. changed to a default wordpress theme but no help

    Not sure what else should I try. Any hints are appreciated.

    thank you

    I have fixed the same problem after updating the database

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Issue with URLs and extra characters’ is closed to new replies.