UrlRewriting.config - Umbraco does not handle .asp
Dear Umbraco-Users
I changed from the older .asp-Version to Umbraco with .net. Now I need a 301-Redirect or Rewriting from the older Files (.asp) to a page from Umbraco with .aspx.
I tried to do that with the following code in UrlRewriting.config, but Umbraco does ignore this (with files with .aspx it works):
If you have access to IIS you can change IIS to pass the .ASP pages so they are processed by the .NET handler and then your code will hit the Url rewriting.
You'll be hard-pushed to get a hosting company to change the way IIS handles .asp requests. The best way to do this on shared hosting is to write a custom 404 page and use that, where the general idea is that you create a script page (classic ASP or .NET) that acts as your 404 page, and then you test the "not found" URL (which gets passed to the 404 page by querystring) and redirect it to the Default.aspx page.
Hope this helps.
Benjamin
P.S. If you're running in Medium Trust you'll need to use my build of Umbraco 4.0.3, not the one on Codeplex, as this does not yet run in Medium Trust. If you are using Blog4Umbraco and <msxml:script> blocks on your installation, I suggest you check out the wiki page for Umbraco on Medium Trust.
UrlRewriting.config - Umbraco does not handle .asp
Dear Umbraco-Users
I changed from the older .asp-Version to Umbraco with .net. Now I need a 301-Redirect or Rewriting from the older Files (.asp) to a page from Umbraco with .aspx.
I tried to do that with the following code in UrlRewriting.config, but Umbraco does ignore this (with files with .aspx it works):
<add name="Redirect01"
virtualUrl="http://www.xyz.ch/ichweissnicht.asp"
destinationUrl="http://www.xyz.ch/Default.aspx"
redirect="Domain"
redirectMode="Permanent"
ignoreCase="true" />
What can I do that Umbraco also can candle .asp?
Thanks
Cornelia
Hi Cornelia,
If you have access to IIS you can change IIS to pass the .ASP pages so they are processed by the .NET handler and then your code will hit the Url rewriting.
( I think... although I have not tested this )
Cheers,
Chris
Hi Chris
I have a Shared-Account with a Hosting-Company. I'll phone them and ask.
Thanks
Cornelia
Hi Cornelia,
You'll be hard-pushed to get a hosting company to change the way IIS handles .asp requests. The best way to do this on shared hosting is to write a custom 404 page and use that, where the general idea is that you create a script page (classic ASP or .NET) that acts as your 404 page, and then you test the "not found" URL (which gets passed to the 404 page by querystring) and redirect it to the Default.aspx page.
Hope this helps.
Benjamin
P.S. If you're running in Medium Trust you'll need to use my build of Umbraco 4.0.3, not the one on Codeplex, as this does not yet run in Medium Trust.
If you are using Blog4Umbraco and <msxml:script> blocks on your installation, I suggest you check out the wiki page for Umbraco on Medium Trust.
Hi Benjamin
The Hoster could install an ISAPI-Filter. So I could define rules with the ISAPI-Filter and solve my problem.
Thanks all for your input.
Cornelia
is working on a reply...