|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can't redirect 400 Bad Request in IIS6
Hi - I'm having a problem with IIS 6 on Windows 2003 Server. Here's the basics
There's an application that has an URL http://domain/oneparticulardirectory/# embedded in it. The user uses the application, it requests the URL and gets a 400 Bad Request response from IIS. Make sense as requesting # isn't allowed. Problem is I can't change the URL in the application so I need to rewrite the GET request on the fly to something sensible like http://domain/oneparticulardirectory/ or http://domain/oneparticulardirectory/somefile.html This is what I've done so far - Tried using Custom Errors in the IIS Admin mmc snapon but found that IIS deals with 400's at a kernel level so that can't be used (what's the point of having custom error pages to deal with 400 Bad Requests in the IIS control panel if the errors never get that far up the stack to be dealt with by them?) - Tried using ISAPI filters (IISRewrite and Ionic's Isapi Rewrite Filter) to rewrite the URLS. Both do the exact job I want them to do with IIS 5 and both rewrite a variety of other types of requests perfectly with IIS 6, but neither will rewrite 400 Bad Requests on IIS 6. I read somewhere that IIS 6 doesn't allow manipulation of "Raw Read Data" via ISAPI filters anymore - Tried running IIS 6 in IIS 5 protected mode to see if it will behave like IIS 5 and allow the ISAPI filters to rewrite the 400's but it does the same thing as it does in normal IIS 6 mode I'm stumped. Note that I know the real solution is to change the application to stop making the bad request, this can be done but it's going to a take a long time - I need something to rewrite the bad requests in the meantime. Another solution is to change to an Apache server as it will easily allow the rewrites but that's not a realistic option |
|
#2
|
|||
|
|||
|
There are 3rd party IIS rewrite plugins, try google. I think the name of one is iis_rewrite.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Quote:
|
|
#4
|
|||
|
|||
|
I don't know about using rewrite filters, sorry, but I believe people have used iis-rewrite on IIS6. I could easily be wrong, though
![]() |
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
|||
|
|||
|
Quote:
Thanks for reading the post and for the help ![]() |
|
#7
|
|||
|
|||
|
Sorry I couldn't help more, good luck with your project, and if you find the magic bullet feel free to refresh this post for any other readers.
If you haven't visited, www.iisfaq.com is a good IIS resource site. |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > Can't redirect 400 Bad Request in IIS6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|