404 Not Found Error after deleting siteRSS

3 replies

Last post Jan 17, 2020 07:51 AM by Jalpa Panchal

  • 404 Not Found Error after deleting site

    Jan 05, 2020 07:50 PM|pattarymes|LINK

    I have installed the URL rewrite module on my SharePoint 2013 WFE. My redirects work just fine as long as the original site exists but as soon as I delete the sub site from SharePoint I get a 404 error. It is like the rules are not even processed. Is there a configuration setting that I am missing? This is the code in my web.config

    <rewrite>
            <rules>
                <rule name="Pattern 1" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="subsite1/*" />
                    <action type="Redirect" url="http://intranet.acme.com/_layouts/15/URLRewrite/Redirect.aspx?src={URL}&amp;qs={QUERY_STRING}" />
                </rule>  
            </rules>
        </rewrite>

    As soon as I delete subsite1 the Rewrite module no longer redirects. This seems to also be consistent will a regular IIS web application where I link to a page that does not exists.

  • Re: 404 Not Found Error after deleting site

    Jan 06, 2020 03:10 AM|Jalpa Panchal|LINK

    Hi,

    It looks like iis is not working with the non exist URL. You could try to run the failed request tracing rule in iis and check the detailed flow of URL rewrite rule.

    If possible you could also share the failed request tracing log here.

    Using Failed Request Tracing to Trace Rewrite Rules

    Regards,

    Jalpa

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: 404 Not Found Error after deleting site

    Jan 15, 2020 11:22 PM|pattarymes|LINK

    I am seeing the following failed request log

    162. view trace Warning -MODULE_SET_RESPONSE_ERROR_STATUS <div id="section_errors_162_details">
    ModuleName SPRequestModule
    Notification AUTHENTICATE_REQUEST
    HttpStatus 401
    HttpReason Unauthorized
    HttpSubStatus 0
    ErrorCode The operation completed successfully. (0x0)
    ConfigExceptionInfo
    </div>
  • Re: 404 Not Found Error after deleting site

    Jan 17, 2020 07:51 AM|Jalpa Panchal|LINK

    This is an authentication-related error. if possible please share the whole frt log with us. which authentication did you enable for the site in iis?

    Select the web application returning 401 - Unauthorized, and double-click the Authentication feature. Right-click the "Anonymous Authentication" provider and select edit. Switch the default anonymous user account ("IUSR") to ApplicationPoolIdentity. Now, right-click the web application in the left pane, select Edit Permissions..., select the Security tab, click Edit -> Add and add IIS APPPOOL\NameOfAppPool. Make sure the Application Pool Identity has read and execute permissions of the folder.

    Note: You should make sure the logs don't contain any personal information.

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.