I have been having on going issues with 301 redirects from .htm pages.
I am running a 4.5.2 website on arvixe shared hosting. I am running several domains from the same instance of umbraco. The site is running ASP.NET 4 NOT integrated pipeline (or at least that is what my control panel tells me)
I have liased with my hosting provideer to try and get .htm mapped correctly in IIS7 but to be honest my server knowledge is limited and so i find it hard to know what to ask for.
My situation at the moment is that any request to my site that have .htm return a completly blank page. Previous to this I was getting that Blue IIS7 404 page but my hosts changed some settings and now I am left with a blank page.
Any suggestions, further reading etc would be really really great.
I think what is happening is that they've mapped .htm file to the asp.net request pipeline, but because Umbraco doesn't pick up the .htm extension, its just returning a blank page. I can't say for 100% without looking at your site in IIS. Do you have your site set up to use extensionless URLs, or are you using .aspx page extensions? Let me know and I'll post a Rewrite rule that you can put in your urlrewriting.config file that might fix this.
Thanks for your help. I am not running extionless urls I have tried some really explicit examples of URL redirects. directing an explicit url to a url on my site but it didnt work. I would really appreciate any examples you could give.
This doesnt seem to do anything except that sometimes it will cause my xml to unpublish so i get that "no content seems to be published" umbraco screen.
you could also try just setting up a rule for a .aspx page to see if that works. Also check for things like rules with identical names, as they won't fire.
Yeah I think i had something like that but because i am running multiple sites with different domains from the same instance of umbraco I thought I would have to be more specific.
Okay so i have done a bit more looking and I had the web.config set to <httpErrors existingResponse="PassThrough" />
When i took this off i get a regular grey and red 404 page. I did a bit more looking and it seems that if i run my site under .net4 integrated pipline then all pages should be handled correctly.
BUT
Before i switch my site over are there changes to the web config i should make? my site is running 4.5.2 any help would be aces.
I switched to integrated pipeline and my redirects work! When i switched to integrated pipeline though IIS7 seems to have rewritten bits of my webconfig :S
this manifested itself as the backend not working, I discovered i was getting a 404 on the DependencyHandler.axd I found this post which solved the issue
.HTM 301 redirects Hell
Hi Guys,
I have been having on going issues with 301 redirects from .htm pages.
I am running a 4.5.2 website on arvixe shared hosting. I am running several domains from the same instance of umbraco. The site is running ASP.NET 4 NOT integrated pipeline (or at least that is what my control panel tells me)
I have liased with my hosting provideer to try and get .htm mapped correctly in IIS7 but to be honest my server knowledge is limited and so i find it hard to know what to ask for.
My situation at the moment is that any request to my site that have .htm return a completly blank page. Previous to this I was getting that Blue IIS7 404 page but my hosts changed some settings and now I am left with a blank page.
Any suggestions, further reading etc would be really really great.
Thanks
L
I think what is happening is that they've mapped .htm file to the asp.net request pipeline, but because Umbraco doesn't pick up the .htm extension, its just returning a blank page. I can't say for 100% without looking at your site in IIS. Do you have your site set up to use extensionless URLs, or are you using .aspx page extensions? Let me know and I'll post a Rewrite rule that you can put in your urlrewriting.config file that might fix this.
Hi Tim,
Thanks for your help. I am not running extionless urls I have tried some really explicit examples of URL redirects. directing an explicit url to a url on my site but it didnt work. I would really appreciate any examples you could give.
thanks
L
Hiya,
Can you post an example of one of the 301 rules that you have that isn't working please?
Hey sure
This doesnt seem to do anything except that sometimes it will cause my xml to unpublish so i get that "no content seems to be published" umbraco screen.
L
That's a bit odd! Try the following:
you could also try just setting up a rule for a .aspx page to see if that works. Also check for things like rules with identical names, as they won't fire.
Yeah I think i had something like that but because i am running multiple sites with different domains from the same instance of umbraco I thought I would have to be more specific.
L
Okay so i have done a bit more looking and I had the web.config set to <httpErrors existingResponse="PassThrough" />
When i took this off i get a regular grey and red 404 page. I did a bit more looking and it seems that if i run my site under .net4 integrated pipline then all pages should be handled correctly.
BUT
Before i switch my site over are there changes to the web config i should make? my site is running 4.5.2 any help would be aces.
L
I think you can just change the site to Integrated mode, there shouldn't be anything else you need to change as far as I can remember.
Okay! That seems to have worked!
I switched to integrated pipeline and my redirects work! When i switched to integrated pipeline though IIS7 seems to have rewritten bits of my webconfig :S
this manifested itself as the backend not working, I discovered i was getting a 404 on the DependencyHandler.axd I found this post which solved the issue
Thanks for your help Tim!
L
No worries! Glad you got it working!
:)
is working on a reply...