Closed Aparna-C closed 3 years ago
First of all, upgrade the package to the latest version 1.2.1: https://nuget.optimizely.com/package/?id=Geta.404Handler
Then please explain how you are testing redirects. What URL is not redirected where. I need good examples to understand your issue.
Hello Marisks,
Thanks for your reply.
I have updated the version and seems that EPiServer site is redirecting. (Ex- Old URL - https://www.knowhae.com/xsxcs New URL - https://www.knowhae.com/) But we are trying to redirect WordPress site. (Ex - Old URL - https://www.de.huntersyndrome.info/public/home/hshfshfs New URL - https://www.leben-mit-hunter.de/). New URL is the EPiServer site. So we are trying to redirect WordPress site to EPiServer site. This redirection is not working.
Note - The WordPress site is going to decommission hence we need to implement this redirection.
Regards, Aparna
I your case WordPress should handle redirects, not the Episerver site.
You need a way for the Episerver site to get the decommissioned URLs, which means the old domains could be pointed to the new Episerver site. Then you'll get 404 errors that you can redirect.
Hello,
Thanks Evest. We have one more scenario where we want redirection. We have link reference to PDF and that PDF has expired. When we click on the link it is giving 404. We want to redirect this PDF to another PDF. Is this possible through this NuGet?
Regards, Aparna
Yes, but as long as the PDF exists in the Episerver file system, the system itself will return the 404 and not redirect it to the handler (because the file actually exists, we just can't show it.)
Rename or delete the expired pdf, and it should generate a regular 404 that you can redirect.
Hello evest,
I have followed the below steps -
1) I have expired the renamed PDF. So now it is giving me the 404 error message. (https://com-corp-prep2.cms.takeda.com/Recycle-Bin/20130424-1ba13launchpressreleasefinal1.pdf)
2) Later I have added entry in gadget. (URL https://com-corp-prep2.cms.takeda.com/Recycle-Bin/20130424-1ba13launchpressreleasefinal1.pdf and new URL https://com-corp-prep2.cms.takeda.com/4ab560/siteassets/system/newsroom/shire-press-releases/2013/august/notification-of-major-interests-in-shares/20130805-1transactioninownshares.pdf successfully saved.)
But still it is not redirecting. (Page URL - https://com-corp-prep2.cms.takeda.com/newsroom/shire-news-releases/2013/brave-awards-now-accepting-nominations/)
Could you please help.
Regards, Aparna
And this is on the Episerver site? https://com-corp-prep2.cms.takeda.com/Recycle-Bin/20130424-1ba13launchpressreleasefinal1.pdf
When I visit: https://com-corp-prep2.cms.takeda.com/Recycle-Bin/20130424-1ba13launchpressreleasefinal1.pdf I get a 301 Moved Permanently with Location: https://com-corp-prep2.cms.takeda.com/4ab560/siteassets/system/newsroom/shire-press-releases/2013/august/notification-of-major-interests-in-shares/20130805-1transactioninownshares.pdf
So:
From what I can see, this is working now, or did I misunderstand.
Hello Evest,
We have added below redirection. but still it is giving 404 error.
We have renamed this file (/en-gb/home/what-we-do/our-products/combined-advate-adynovi-pi-sept-21.pdf) too in system.
Could you please help us because we are still facing this 404 issue.
Thanks in advance.
Regards, Aparna Chaudhari
@Aparna-C Can you check if pdf
is not added to "Ignored extensions" in the configuration? https://github.com/Geta/404handler#specifying-ignored-resources
Hello Marisks,
No, there is no extension added for pdf.
Regards, Aparna
Could it be that PDFs are not handled by ASP.NET? Maybe result cached in Cloudflare or somewhere else? Then 404 handler will not be able to do anything if the request never hits ASP.NET.
Hello Marisks,
We will check for cache in Cloudflare. but we are struggling to redirect PDF. We have lots of issues pending related to redirection. We have two instances where the gadget is not working properly. 1) The PDF file url is not redirecting even if we have expired, renamed or deleted the PDF. (https://com-corp-prod2.cms.takeda.com/4a724b/siteassets/en-gb/home/what-we-do/our-products/combined-advate-adynovi-pi-sept-21.pdf) 2) 404 project url is also not redirecting. (Old - https://www.de.huntersyndrome.info/public/home/ and New - https://www.leben-mit-hunter.de/)
Regards, Aparna
Hello Mariska,
Yes that is the episerver site. 1. Could you please guide us how we can sure that the request is handled by ASP.NET?
Regards, Aparna
We are using version 1.0.0.
We are experiencing issues where URL redirects not working when we add new URL.
We can see all redirect rules in EPiServer Dashboard gadget and also in the database table. Also we are getting successful message after adding redirect rule. but URL is not redirecting.
Thanks in advance for your help.