Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 13778

How to handle 404 in reverse proxy scenario

$
0
0

Hi,

I am using URL Rewrite on reverse proxy server to route incoming requests to SP server

<rule name="SP Reverse Proxy"  stopProcessing="true"><match url="(.*)" /><action type="Rewrite" url="http://XX.XX.XX.XX:80XX/{R:1}" logRewrittenUrl="true" /></rule>

I dont want to display ASP.net error page with version information whenever user requests for a page that dont exist

I an unable to do so inside _forms folder

Below is summary of current behavior

RequestResponse
proxy Server IP/a.aspxIE Page can not be found
SP Server IP/a.aspxIE Page can not be found
proxy Server IP/_forms/a.aspxASP.net error page with version information
SP Server IP/_forms/a.aspxSharepoint Access denied page

This is web.config inside _forms folder

<?xml version="1.0" encoding="utf-8"?><configuration><system.web><authorization><allow users="*" /></authorization><identity impersonate="true" /><customErrors defaultRedirect="~/error.htm" mode="On"><error redirect="~/error.htm" statusCode="404" /></customErrors></system.web><system.webServer><defaultDocument><files><clear /><add value="default.aspx" /></files></defaultDocument></system.webServer></configuration>

This is web.config inside root folder of reverse proxy server

<?xml version="1.0" encoding="UTF-8"?><configuration><system.web><httpRuntime enableVersionHeader="false" /> <customErrors mode="On" defaultRedirect="~/error.htm"> <error statusCode="403" redirect="~/error.htm" /> <error statusCode="404" redirect="~/error.htm" /> <error statusCode="500" redirect="~/error.htm" /> </customErrors> </system.web><system.webServer><rewrite><rules><rule name="SP Reverse Proxy"  stopProcessing="true"><match url="(.*)" /><action type="Rewrite" url="http://XX.XX.XX.XX:80XX/{R:1}" logRewrittenUrl="true" /></rule></rules></rewrite><httpErrors><remove statusCode="404" subStatusCode="-1" /></httpErrors></system.webServer></configuration>

Please help


Viewing all articles
Browse latest Browse all 13778

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>