I have a .NET site that I am taking down and I plan on redirecting all requests to www.mysite.com
using a rewrite rule in the web.config
. Should be a simple task, but it's not. I've removed all the content from the filesystem except a single Default.aspx
page and a default web.config
with the following rewrite rule:
<rule name="Redirect All" stopProcessing="true">
<match url="^(www\.)?mysite\.com(/.+)$" />
<action type="Redirect" url="www.mysite.com" appendQueryString="false" />
</rule>
If I request www.mysite.com/garbage.aspx
the server is still trying to look up garbage.aspx
, or any other url I provide just as if the rewrite rule was not there.
Very frustrating. Ideas?
Do you want to redirect ALL requests to your new site? If so, this should do it:
<match url=".*" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With