Once apon a time, to make a quick solution of homepage redirect to first child node, I implemented a permanent redirect right within template logic like this:
And, for some reason, it works very slow on a live hosting, about 3-7 seconds sometimes.
I guess, because it needs time to handle default routing before execute the template logic with redirects of it. It is not good anyway, but I didn't expect it take so much time.
Are there ways to solve the problem with standart Umbraco methods?
There are several packages for managing 301 redirects from Umbraco back office, but I don't know which one to recommend. And of course "IIS Rewrite Rules" is more efficient.
Permanent redirect (301) in a Tamplate logic working too slow on live
Hello, Umbracians.
Once apon a time, to make a quick solution of homepage redirect to first child node, I implemented a permanent redirect right within template logic like this:
RedirectionPage
is root node in my case.And, for some reason, it works very slow on a live hosting, about 3-7 seconds sometimes.
I guess, because it needs time to handle default routing before execute the template logic with redirects of it. It is not good anyway, but I didn't expect it take so much time.
Are there ways to solve the problem with standart Umbraco methods?
I wanted to use umbracoInternalRedirectId, but it just rewrites the url without 301 redirection.
What a best practice to give to content manager posibility to manage 301 redirects right into page tabs?
Thank you
Hi Dmitriy
The best way in sense of performance is to use IIS Rewrite Rules. Read more how to use it - https://our.umbraco.com/documentation/reference/routing/IISRewriteRules/
There are several packages for managing 301 redirects from Umbraco back office, but I don't know which one to recommend. And of course "IIS Rewrite Rules" is more efficient.
Thanks,
Alex
Hi, Alex
Is
IIS Rewrite Rules
the same asumbracoInternalRedirectId
? Is it has a defference in performance?It should be a huge difference in performance.
no, it's not the same
"IIS Rewrite Rules" - IIS module, it works with request before umbraco.
"umbracoInternalRedirectId" - umbraco logic, it works after IIS modules.
That's why "IIS Rewrite Rules" the best and efficient way.
Thanks,
Alex
is working on a reply...