How to Redirect IIS 400 error to custom URL - web-config

We have a page example.com/my-page . by mistake, it was announced to clients as example.com/my-page/%0D on a PDF invitation.
When opened the server returns "HTTP Error 400. The request URL is invalid."
How can we redirect the wrong url to the correct url.

Related

How can I access the redirected url in postman?

I have a big problem. I'm sending a request on postman. Then, the url is redirected. I can see the redirected url in Postman console. But I can't access it from the test tab. I need to access the redirected url because the token is generated here. I can do the same operation using the regular expression extractor in JMeter. But I can't do it in Postman. How can I do this in postman? Can you help me?
enter image description here
You can turn off redirects on a specific request (toggle Automatically follow redirects):
Then you can access the Location header contents through:
pm.response.headers.get('Location')
Following that, you can hit the redirect URL via sendRequest or saving the URL in a Postman variable and using setNextRequest.

Surveymonkey: create webhook to get response in sugarcrm

I am trying to create a surveymonkey webhook to receive my survey response and i am passing my SugarCRM custom entry point URL as "Subscription Url". But i am getting error " 'mycustomEntryPointUrl' did not return a success status code. Status code is 301". My Entry point is working fine if i run it in browser using its URL also my Sugar is working smoothly.
So, i just want to know any other reason which can cause this error.
Yes so HTTP status code 301 means the page has moved permanently. If you visit it in your browser, for example, you would see a network request to the page specified with a status code of 301, then a second one to the new page. Our API request won't do any redirect, so if a 301 is returned it will raise an error.
This sometimes happens when you go to a page with http and then it redirects to https due to rules on your server.
You also want to make sure your subscription URL supports a HEAD request without any redirect.

Return a 404 or other error code from GWT

I'm working on handling history within my GWT application.
If, during the History.ValueChanged event, the history tag value is unknown,
I'd like to show the user a 404.
How can I return a standard "Page Not Found" from GWT?
URL tokens (the part after the #) are not sent to the server - changes to that URL part don't create an HTTP request, so there is no HTTP response, and hence no HTTP error code.
(Of course you can react to URL token changes from within your History's ValueChangeHanler, and manually trigger an HTTP request - which could then return a 404. But to show that 404 to the user, you'd have to relocate to that URL, which is probably not what you want. How about showing a nice error message to the user instead?)

url requested redirect but the

When I pass the url by the Facebook debugger I receive the "Critical error"
"URL requested a HTTP redirect, but it could not be followed."
The redirected URL is the same as the Fetched and Canonical with the added "?AspxAutoDetectCookieSupport=1". So the link rejects this .
I tried the cookieless = UseCookies at Web.config in order to avoid the cookiesupport parameter in the URL but nothing happens , is still there.
this is the section in web.config :
<sessionState cookieless="UseCookies"/>
Is this fine?
Another way for suppressing the parameter?
Its a Facebook cache issue?
You can try it :
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fdisaweb.com%2FModulos%2Ftorre-noria-11.aspx
Thanks in Advance
You're link redirects to:
http://disaweb.com/modulos/torre-noria-11.aspx/?AspxAutoDetectCookieSupport=1
but that returns a 302 to the same location. You can't return a 301 or a 302 to the exact same location that is requested.

Why my plain http request to poke my friend in fb failed?

While i am logged in, sending a plain http poke request to my friend but it fails every time. why? Status code is 302 Found.
HTTP status 302 means a redirect.
The temporary URI SHOULD be given by the Location field in the
response. Unless the request method was HEAD, the entity of the
response SHOULD contain a short hypertext note with a hyperlink to the
new URI(s).
So it doesn't mean the request failed. You just have to look at another url (given in the Location header) to find the response.