Bad Request - Invalid URL when loading page

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When trying to access a page with some special characters in its URL (i.e: <baseURL>/display/SPACEKEY/Test+%09Test), you'll receive the following instead:

This can occur with any value between %00-%1F, inclusive.

Cause

This will only happen if you're using the IIS proxy. When Confluence makes a page it takes the content of the title and encodes it if need be. The characters %00 to %1F represent ASCII control characters, which were originally designed to control hardware devices. You may still see these characters occasionally in text, such as %09, which represents the 'tab' character.

Workaround

To allow control characters to be used in URLs, please follow the instructions from this Microsoft KB article to set the "AllowRestrictedChars" registry key to true. This requires a restart of both the HTTP and IIS related services to take effect. A full server restart will do both.

An easy way to do this is to copy the following into a .reg file and run it on your server (for more information see https://support.microsoft.com/en-us/kb/310516/):

Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters]
"AllowRestrictedChars"=dword:00000001


Alternatively, you can remove the control character from the title itself. To do so:

  1. Find the id of the page with this SQL query:

    select contentid from content
    where title like '%<PAGE_TITLE>%'
  2. Go directly to the editor for this page with this URL:

    <baseURL>/pages/editpage.action?pageId=<PAGEID_FROM_QUERY>


  3. Rename the page, removing the control character.

Last modified on Jan 14, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.