• Resolved Divanshu

    (@dvapps)


    Hi,

    Our site URL contains an & for eg: example.com/site&name

    This causes the request which is sent for the products export to return a 404, as the & gets changed to “&”. For eg. the request becomes: https://example.com/site&name/wp-admin/admin-ajax.php.

    Appears to be just the way the URL for the request is encoded, so I don’t believe it should be too hard to fix.

    Please let me know if further info is required.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Zee

    (@doublezed2)

    Hello Divanshu,

    Thank you for contacting WooCommerce support.

    I understand that “&” character in your site URL is being converted to “&”, which causes the export request to return a 404 error.

    WordPress automatically sanitizes URLs, and “&” is not used in permalinks for WordPress.
    May I ask how you created page or posts that have the “&” character in the URL?

    Sharing screenshots would be helpful. You may use https://snipboard.io to upload images and share link here.

    Once I have more information, I will be in a better position to assist you further.

    Best regards.

    Thread Starter Divanshu

    (@dvapps)

    Hi,

    The website is setup in a subdirectory with the folder name including an &.

    This is a client’s website so was already setup, I don’t think anything was specifically done to allow for the & in the url.

    All other functionality works fine just this specific page seems to have an issue.

    Zee

    (@doublezed2)

    Hello Divanshu,

    Thank you for your reply.

    I understand the website is in a subdirectory with an “&” in its name.

    Can you rename the directory and remove the “&” character? Then update the site URL in the WordPress database. This should fully resolve the issue.

    This causes the request which is sent for the products export to return a 404, as the & gets changed to “&”. For eg. the request becomes: https://example.com/site&name/wp-admin/admin-ajax.php.

    Could you clarify this step where you are sending a request for product export?
    Sharing screenshots would be helpful. You may use https://snipboard.io to upload images and share link here.

    Once I have more information, I will be in a better position to assist you further.

    Best regards.

    Thread Starter Divanshu

    (@dvapps)

    Hi,

    This would not be possible as we have lots of users already using this site for years.

    Is there any way to fix this with a htaccess rewrite or a filter?

    Hi @dvapps,

    Unfortunately, I’m not aware of any alternative solutions, as WordPress and WooCommerce, by default, do not support “&” in URLs.

    There might be possible workarounds using filters or modifying site rules, but this would require a custom solution. Since this falls outside our support scope, I recommend reaching out to WooExperts or hiring a professional from Codeable.io for further assistance.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Product export not working due to “&” in site url’ is closed to new replies.