Geta / geta-notfoundhandler

The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
19 stars 15 forks source link

Import as permanent redirect #115

Open performingmonkey opened 3 months ago

performingmonkey commented 3 months ago

We are planning to use the import process to import over a thousand redirects in an xml file. This mostly seems to be working, however these are all imported as temporary redirects. Is there anyway to set the imported redirects as 301s?

tmedina-clari commented 3 months ago

Would love to know if this is possible as well.

performingmonkey commented 3 months ago

Hey Therese,

Yeah I managed to figure it out in the end. You can add the redirect type in as an Attribute on the 'old' tag. Example below.

`

/about-us/annual-reports/ /about/strategic-documents/

`

tmedina-clari commented 3 months ago

Hey Therese,

Yeah I managed to figure it out in the end. You can add the redirect type in as an Attribute on the 'old' tag. Example below.

<url> <old redirectType="Permanent">/about-us/annual-reports/</old> <new>/about/strategic-documents/</new> </url>

Awesome, this worked for me too. Thank you!