Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Given that it's IIS, adding </p> <pre><code>&lt;% Response.Status = "404 Not Found" %&gt; </code></pre> <p>to the top of 404.shtml should change the response code to 404.</p> <p>I am not on a windows machine so I am unable to test it at the moment to verify.</p> <p><strong>Update:</strong></p> <p>I was finally able to run a few tests on a IIS 6. As you mentioned in a comment to my post, an <em>.shtml</em> file does not allow script commands to run. So there are at least two ways to work around this:</p> <ol> <li><p>Instead of naming your custom 404 handling page <em>404.shtml</em>, name it <em>404.asp</em>. The user should never see the actual name of the page so it shouldn't cause any issues. Note that "Active Server Pages" must be set to 'Allowed' in the Web Service Extensions folder of IIS.</p></li> <li><p>Modify the page extension mapping for .shtml to use asp.dll instead of ssinc.dll. You can do this from IIS by selecting the website and viewing Properties -> Home Directory tab -> Configuration -> Mappings tab. Note that this is far from an ideal solution because now all your <em>.shtml</em> files will be processed by <em>asp.dll</em>. This could cause your pages to render more slowly (assuming <em>asp.dll</em> processes files more slowly than <em>ssinc.dll</em> due to greater complexity) and violates the <a href="http://en.wikipedia.org/wiki/Principle_of_least_privilege" rel="noreferrer">principle of least privilege</a>.</p></li> </ol> <p>If neither of the options fit your situation, then it may still be possible but the solution isn't immediately obvious to me.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload