• Resolved streettb

    (@streettb)


    I’m having an issue with URL encoding. For example: “https://my.domain?page=somevalue&id=1” will be encoded as “https://my.domain%3page%3Dsomevalue%26id%3D1”.

    I’m including some relevant WordPress install and server environment info below if this could be the issue. I disabled other plugins to see if that was causing the issue, and it didn’t appear to resolve this. Thanks in advance.

    WordPress Version: 6.3
    WordPress Cron: Yes
    Server Software: nginx
    PHP Version: 7.4.33.4
    Mcrypt Enabled: No
    Mbstring Enabled: Yes
    Loaded Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, cgi-fcgi, newrelic, mysqlnd, PDO, xml, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, json, ldap, exif, msgpack, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, soap, sockets, ssh2, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlrpc, xmlwriter, xsl, zip, memcached, Zend OPcache
    Database Management System: MySQL
    Version: 8.0.34
    Database Character: Set latin1
    Database Collation: latin1_swedish_ci

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author John Godley

    (@johnny5)

    As with https://ww.wp.xz.cn/support/topic/url-gets-encode-and-then-not-recognized/ I am unable to reproduce this. Maybe you can include a screenshot of your redirect so I can see exactly what you are entering?

    Thread Starter streettb

    (@streettb)

    I’ve embedded two screenshots here: (1) Adding an example URL and then (2) the “Check redirect” pop-up screen which shows the URL encoding. If I browse to the URL with the encoding, the redirection works, however, I want the redirection without the encoding.

    In terms of entering the URL in the “Source URL” field, I tried both copying and pasting as well as typing the characters (assuming that may have something to do with the encoding) but both ways result in the encoded URL.

    Here’s a link to the screengrab in case it is too small to read in the post:
    https://lopc.org/wp-content/themes/LOPC2020-cc-child/assets/images/redirection-screenshot.jpg

    Thanks!

    Plugin Author John Godley

    (@johnny5)

    Is the URL being saved with the encoded characters?

    Thread Starter streettb

    (@streettb)

    If the “check redirect” pop-up is showing the URL with encoded characters, I would assume that the URL is being saved in the database with encoded characters.

    Plugin Author John Godley

    (@johnny5)

    You will know if they are being saved encoded as it will show in your list encoded.

    Thread Starter streettb

    (@streettb)

    I’m digging a little deeper into this. It appears that the example URL above does redirect. However, I’m actually wanting to redirect a WordPress backend URL, i.e., “/wp-admin?page=somepage&id=33”. Oddly, the URL encoded version of the URL DOES redirect, but the URL as it is listed does not redirect (it just goes to the wp-admin page). Can this plugin not be used for WordPress backend URLs? A little puzzled why the encoded URL does redirect but the URL as inputted doesn’t.

    • This reply was modified 2 years, 7 months ago by streettb.
    Plugin Author John Godley

    (@johnny5)

    The plugin doesn’t let you redirect wp-admin pages for safety reasons – you will lock yourself out of WP.

    • This reply was modified 2 years, 7 months ago by John Godley.
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘URL redirection and URL encoding’ is closed to new replies.