0

I want to add alternate tag for multiple lang. website, previous developer had added the alternate url using the below code:

 <link rel="alternate" href="@Request.Url.Scheme://@Request.Url.Authority/us/@Request.RawUrl.Remove(0,1).Replace("/us","")" hreflang="es-us" />

it was done only for one lang. Now I am facing problem to get the page only, rawurl is returning the "/us/folder/pagename" but I want "/folder/pagename". is there any way by which I can achieve this?

It is on html side, i don't want to get it on code level and pass to view. i am asking if there is any way by which i can get in view only.

Ram Singh
  • 6,664
  • 35
  • 100
  • 166

0 Answers0