1 Replies - 321 Views - Last Post: 25 April 2017 - 08:53 AM

#1 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 2024
  • View blog
  • Posts: 3,604
  • Joined: 13-January 08

How to set up IIS 7.5 to 404 every request / How to capture the URI

Posted 25 April 2017 - 08:44 AM

Hi all. Sorry if either or both of these questions have been asked/answered before. Once upon a time, I had a hosted development server running Linux/Apache where the host had managed to set it up so that every request to my site was 404'd and, thus, routed to a 404 page handler while passing the user's originally requested URL (otherwise known as URI).

I now have a local dev Windows machine and I'd like to duplicate that setup if possible...but I have no idea how to get IIS to 404 every request nor how to get it to pass along the URI to the 404 page.

Any help/suggestions would be greatly appreciated.

PS: if it would be easier to use Apache to do this (some of the Google results I've found suggest this may be the case) can a Windows box run Apache side by side with IIS?

Is This A Good Question/Topic? 0
  • +

Replies To: How to set up IIS 7.5 to 404 every request / How to capture the URI

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13346
  • View blog
  • Posts: 53,150
  • Joined: 12-June 08

Re: How to set up IIS 7.5 to 404 every request / How to capture the URI

Posted 25 April 2017 - 08:53 AM

Well.. you can muck with the settings.. Example here:
https://support.micr...site-in-iis-6-0

.. or see if that 'app_offline.htm' bit still works and have it just redirect all requests to a 404 page.
http://www.codeguru....ion-Offline.htm
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1