Support » Fixing WordPress » Permalink adding unwanted question mark

  • Resolved ringostar77

    (@ringostar77)


    Hi there,

    all of a sudden, my permalink structure %postname% ist not working anymore. It adds an unwanted question mark at the first position. So for example the url should be https://www.url.com/test-site but it is changed to https://www.url.com/?test-site. This causes a redirection to the home page.

    So I have changed the permalink structure to ?p=123 for now and this seems to be working.

    I am using WordPress 5.0.3 with the The7 theme on PHP 7.2.14 (Apache). Every plugin is up to date. Disabling all plugins and changing to default theme did not work either.

    • This topic was modified 3 months ago by  ringostar77.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator t-p

    (@t-p)

    all of a sudden, my permalink structure %postname% ist not working anymore.

    Why it’s not working?

    Have a read of Using_Permalinks try a custom permalink structure again. If clearing your Permalinks does not alleviate the issue, this could be attributed to anything from a web server configuration to a bad WordPress install.

    ringostar77

    (@ringostar77)

    I don’t know, why it is not working anymore because I haven’t changed anything the last time on the problematic website.

    Yes, I have read that and changed permalink structure to custom as you said, but unfortunately without success. Absolutely no other structure is working anymore than ?page_id=X

    Every other website on our server is working fine though.

    • This reply was modified 3 months ago by  ringostar77.
    qroberts

    (@qroberts)

    @ringostar77 did you fix this afterwards? I have been experiencing this same issue since yesterday. When we try to go to http://domain.tld/page the URL is being changed to http://domain.tld/?page adding a ? in the URL and not loading the correct page. I checked the permalinks section (/wp-admin/options-permalink.php) in the settings and it is set to ‘Post name’. What else could be adding the ? to the URL?

    ringostar77

    (@ringostar77)

    @qroberts I fixed it. There was a misconfiguration on some domains in plesk. I was using nginx and with some custom redirect rules. These rules were causing the issue :/

    @ringostar77 Hi can you explain what you did? I have similar issue on a plesk environment and i’m new to this. Thank you

    @organu @ringostar77 we are also using Plesk. I checked our .htaccess files and they look good for WordPress. I also disabled every Plugin and the question mark is still getting prefixed to our URL’s.

    Our permalink settings (wp-admin/options-permalink.php) are set to use Post name. If I change this to Plain the website works as the question mark is needed anyways for the URL ?p=123 or ?=page_id=123 but with Plain you do not use question marks.

    In Plesk when I go to the section where the domain is, under “Apache & nginx Settings”, I have the following settings:

    MIME types: default
    Handlers: Default
    Deny access to the site: Default
    Index files: Default
    Expires: Default
    Additional Headers: Default
    Restrict the ability to follow symbolic links: not enabled
    Proxy mode: Enabled
    Smart static file processing: Enabled
    Serve static files directly by nginx: not enabled
    Enable nginx caching: not enabled

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.