URLs with space characters return 403 (Forbidden) errorAs of version 2.4.56 of the Apache web server, an important security fix was implemented for the vulnerability "Apache HTTP Server: HTTP request splitting with mod_rewrite and mod_proxy" (CVE-2023-25690). With this fix, all rewrite requests via .htaccess files that contain spaces or control characters in backreferences, will result in 403 error messages as these characters will not be escaped correctly before being transformed/rewritten. If you use the Live HTTP logs section of the hosting Control Panel to investigate the problem, you will find the full error: How to fix Apache error AH10411?To resolve problems with applications or custom scripts related to this change, you have two options:
The second solution is usually preferred as it doesn't require you to modify all elements within your website, and restores the old rewrite behavior. To fix the "Rewritten query string contains control characters or spaces" error with the second solution, you will basically need to modify the rewrite rules with backreferences in your .htaccess file following this example: OpenCartIn OpenCart, SEF URLs are generated with dashes instead of spaces by default. If some URLs or other elements of your website that contain space characters in their name return 403 errors while SEO URLs are enabled for OpenCart, the problem is most likely caused by the change implemented by the Apache web server team. To restore the old rewrite behavior for OpenCart search-engine-optimized links, you will need to change the following line in your .htaccess file: DrupalOlder versions of Drupal may return 403 errors due to intervals in the URL when Clean URLs are enabled. If this happens, you will need to change the following line in your Drupal .htaccess file from: |