If page 3 is deleted I would like to return a 404 header and show a custom error page saying... "Page nr 3 is not active any more yada yada yada".
When I try this I end up in a never ending loop of 301 redirects, everything works until I return the 404-headers
Response.Status = "404 Not Found";
Response.StatusCode = 404;
I'm thinking that the 404 handler in SEO Checker might be the resone for the never ending loop? Is there any way to ignore all the 404s comming from this page.aspx-file?
ehh yes page.aspx and yes ignore list in redirect manager is a SEO checker option (documented in the user manual ;-) ) when you click on delete you see that option.
7.5 Ignore list
Use the following ignore lists to show the items that will be ignored during > validation:
- Ignored validation issues
- Ignored inbound link errors
- Ignored configuration issues
The issue is not about the validation of the page it's about the redirects that just end's up in a loop. Does this ignore-configuration disable your http-handler for these document types?
About this:
Add the default.aspx page to the ignores url's option in web.config
Really simple and straightforward. But the only thing that happens is that SEO Checkers module creates a 301 back to the same page over and over again. Look here from my Fiddler:
I've tried with:
The 410-status (as you can see in the code snippet),
Checked "ignore" this page in the "Redirect manager" in the SEO Checker-section in the backoffice.
It still just ends up in a 301 loop, if I comment out the SEO Checker module in the root web.config everything works just fine and as expected.
I think I might have found something that effects this. I have the "force www" option selected when the 301-loop is created BUT if I choose "Ignore" it all works just fine and the page returns a 410.
It's obviously a bug in the package here that needs to be investigated and fixed. During this is there any way to configure SEO Checkers module to NOT handle the page.aspx-file that I'm having these issues with?
If yes, please explain how and where I will configure this.
Did you set the querystring option also? I was wrong about statuscode 410. That triggers the notfound module also. and will cause the redirect loop.
That the loop occurs is because there is a redirect from www to non www first or vice versa and then the original request is not the same as the page where you redirect to and causing that loop.
I tried that as well. The thing is that when I delete something in the "Redirect Manager" it just comes back again on the next incoming request and it creates a new redirect to the same page.
I was wrong about the "Ignore"-thing it must have been when I had comment out the moduel in web.config.
I'll drop you an email so that I can share more details.
Return a 404 from a custom page
Hi!
I'm running a site where I have dynamic pages. For simplcity lets say it looks like this
page.aspx?id=1 page.aspx?id=2 page.aspx?id=3 page.aspx?id=4
If page 3 is deleted I would like to return a 404 header and show a custom error page saying... "Page nr 3 is not active any more yada yada yada".
When I try this I end up in a never ending loop of 301 redirects, everything works until I return the 404-headers
I'm thinking that the 404 handler in SEO Checker might be the resone for the never ending loop? Is there any way to ignore all the 404s comming from this page.aspx-file?
// m
Hi Markus,
The redirect module kicks in in that case and I think there is a redirect rule that only looks at the page.
4 things to solve this
Hope this helps,
Richard
Hi!
Thank you Richard!
Thanks! You mean page.aspx and not default.aspx right?
Which of these options would you recommend? How do I add it to the "ignore list"? Is that a SEO Checker-feature?
// m
ehh yes page.aspx and yes ignore list in redirect manager is a SEO checker option (documented in the user manual ;-) ) when you click on delete you see that option.
Hope this helps!
Hi! Great =D
Looking at the ignore-documentation it says:
The issue is not about the validation of the page it's about the redirects that just end's up in a loop. Does this ignore-configuration disable your http-handler for these document types?
About this:
How could that be done?
Hi again Richard!
I've tried a couple of thing without success, what I'm doing is to change the status code in the code behind of my page like so:
Really simple and straightforward. But the only thing that happens is that SEO Checkers module creates a 301 back to the same page over and over again. Look here from my Fiddler:
I've tried with:
It still just ends up in a 301 loop, if I comment out the SEO Checker module in the root web.config everything works just fine and as expected.
I think I might have found something that effects this. I have the "force www" option selected when the 301-loop is created BUT if I choose "Ignore" it all works just fine and the page returns a 410.
It's obviously a bug in the package here that needs to be investigated and fixed. During this is there any way to configure SEO Checkers module to NOT handle the page.aspx-file that I'm having these issues with?
If yes, please explain how and where I will configure this.
Hi Marcus,
Did you set the querystring option also? I was wrong about statuscode 410. That triggers the notfound module also. and will cause the redirect loop.
That the loop occurs is because there is a redirect from www to non www first or vice versa and then the original request is not the same as the page where you redirect to and causing that loop.
But Hope querystring option works.
Best,
Richard
Hi!
I tried that as well. The thing is that when I delete something in the "Redirect Manager" it just comes back again on the next incoming request and it creates a new redirect to the same page.
I was wrong about the "Ignore"-thing it must have been when I had comment out the moduel in web.config.
I'll drop you an email so that I can share more details.
/ m
Hi Markus,
I've added an option to disable Notfound functionality for a request by setting SEOCheckerIgnore404Request to "true".
So if you install the version below and change your snipper to the following it will not try to find the page again and will not redirect.
1.9.4.1 prerelease can be found at https://www.dropbox.com/s/b3hetzibqc698s9/seo-checker1941.zip?dl=0
Hope this helps,
Richard
Thanks! I'll give this a try and let you know!
/ m
Hi Richard!
Before I start to work on this.
My client is on Umbraco 4.11.10, did you drop the V4-support in version 1.9.4?
Is there any thing that would not work or have you just stopped to test against V4?
// m
Yup 4.11 should work, please test on staging first :)
Just to follow up - this worked great =D
// m
is working on a reply...