This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: HTTP Error 400 invalid characters
Author
Message |
rwright1
Newbie


Joined: 27 October 2010
Posts: 5
Posted: 27 October 2010 at 10:37am

Hi

I can't quite figure this one out. I am using Helicon
APE to rewrite URLs and APE is rewriting a url like so:

http://mywebsite.com/groups/viewbulletin/12-
Nov+8%3A+StetsonConnect+beta+launch.html?groupid=9

This throws the error:
HTTP Error 400.0 - Bad Request
ASP.NET detected invalid characters in the URL.

My guess is that the colon ":" encoded as "%3A" is the
problem.

What do I do to fix this?

Perhaps I need a rewriterule to strip invalid characters?

Thanks in advance for your help.
Russ
Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 27 October 2010 at 6:31pm

Hello.
That’s default IIS behaviour. Please open IIS manager, select server node in the tree and find “Request Filtering” icon. Open it. On the right panel click “Edit feature settings”. In the opened dialog check “Allow double escaping” box.

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 
rwright1
Newbie


Joined: 27 October 2010
Posts: 5
Posted: 28 October 2010 at 7:03am

Thank you for your reply. 

I thought the problem was the colon but as I read about double escaping, I see it is actually the plus sign "+".

Enabling the "Allow double escaping" feature would for sure fix it.

If I am unable to change this setting, would it be possible to set a rewrite rule that removes these invalid characters and replaces them?

Regards
Russ

Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 28 October 2010 at 8:12pm

Hello.
I’m not sure about this, because IIS may process requests before modules. Try the following test code:
Code:
RewriteEngine On
RewriteRule .? [G]


If you’re able to see “Gone” response on that request, then it’s possible. Just let me know and I’ll write you a code.

Thanks.

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 
rwright1
Newbie


Joined: 27 October 2010
Posts: 5
Posted: 29 October 2010 at 3:03pm

Okay I tried your code and here is the result:

HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its
name changed, or is temporarily unavailable.
Back to Top
 
rwright1
Newbie


Joined: 27 October 2010
Posts: 5
Posted: 29 October 2010 at 3:04pm

Here is my existing .htaccess file contents:
This is straight from joomla

RewriteEngine On
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI}
(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* -
[E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 31 October 2010 at 11:30am

Hello.
I think you should use “Allow double escaping”. As you can see the test rule didn’t work, so IIS processes request before Helicon Ape and you can’t use mod_rewrite on that stage.

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version