Redirects

Posted by Community Admin on 04-Aug-2018 20:26

Redirects

All Replies

Posted by Community Admin on 05-Dec-2017 00:00

We are moving an existing site into Sitefinity.  Obviously the URLs are not all going to be exactly the same.  I would like to allow the content owners to be able to setup redirects from the old urls to the new Sitefinity urls.  This will also need to be used for other arbitrary redirects in the future.  I was thinking of creating a Sitefinity list or module that would contain the old and new urls.  Where does the code need to go to do these redirects?  I would assume code would be needed that runs on every request.

Posted by Community Admin on 06-Dec-2017 00:00

 

Posted by Community Admin on 06-Dec-2017 00:00

No extra work needed my friend, what you are asking for is built into the page properties.  If you look at a pages Title & Properties, check the box to Enable Multiple Urls for this page.  So if the contact pages used to be yourdomain.com/.../contact-us and now it is yourdomain.com/contact.  In the multiple urls area you will place ~/about/contact-us this will 301 redirect the old to the new. 
Documentation:https://docs.sitefinity.com/administration-add-additional-urls-to-a-page

Posted by Community Admin on 07-Dec-2017 00:00

That works for URLs that are staying on this site, but we have some that will actually need to be redirected to another site since some are applications instead of just content and will be moved under a different, non Sitefinity managed, site.  We also have a need for some redirect urls (like mysite.com/gotosomething) to redirect to various locations, on and off the Sitefinity site.  My concern there is since those redirects are 301 permanent redirects, doesn't seem like there would be a way to redirect them elsewhere in the future if the need arose.  There any way to make these 302 redirects?

Posted by Community Admin on 07-Dec-2017 00:00

I think I found a solution, although not a really pretty one.  Instead of using a redirect page for URLs I might want to re-point some day, I can use a regular page and set a meta refresh in the page properties to redirect to the needed URL.  Still a multi-step process so not real clean, but at least it's manageable within Sitefinity.  If you have any other options, please let me know.

This thread is closed