Using XSLTSearch or other packages for XML Sitemap generation, the link to the german homepage is always generated as "/de.aspx" (using umbraco.library:NiceUrl()), but I don't want to use them for the home pages. I would like to get "/de" or "/en" instead in case of the home pages (without changing each packages XSLT file). Is it possible to achieve that? Is there a way to get the Alternative Link from NiceUrl() method for specific pages?
You can adjust the script a little bit ie by checking @level=1 and check what node it is, and put a rewrite rule in the UrlRewriting.config , i think that should work.
Multilingual Site - Homepage Links
Hello,
I have a multilingual site running with the following folder structure (no sub domains):
Content
- Site
-- de
-- en
On properties for the german homepage (de), there is the following:
Using XSLTSearch or other packages for XML Sitemap generation, the link to the german homepage is always generated as "/de.aspx" (using umbraco.library:NiceUrl()), but I don't want to use them for the home pages. I would like to get "/de" or "/en" instead in case of the home pages (without changing each packages XSLT file). Is it possible to achieve that? Is there a way to get the Alternative Link from NiceUrl() method for specific pages?
Best Regards
Andreas Pfanner
If you set
you will get the URLs without the file extension (you will need to configure wildcardmapping in IIS though).
Regards,
Magnus
Hi Magnus,
the problem here is that I don't want directory urls for all of the sub pages, but only for the home pages.. Any chance?
Best Regards,
Andreas
You can adjust the script a little bit ie by checking @level=1 and check what node it is, and put a rewrite rule in the UrlRewriting.config , i think that should work.
Why wouldn't you want directory urls for all pages?
I've not tested this, but something like this should work:
Regards,
Magnus
Its kinda cosmetic decision.. Is it preferred to use directory urls? I guess concerning SEO it should be no difference..
Best Regards
Andreas
For SEO reasons it has a slight advantage as far as i know.
Or you could try 4.6.1, looks like it has been fixed! My topnode returns "/" instead of CompanyName.aspx :)
Edit: Ahhh didn't see the companyname.com/de, don't know if that works.
I already use 4.6.1, but I have multiple "top nodes" (for each language)..
Best Regards
Andreas
I don't think /de will work if you don't use niceurl's , i think it will result in a 404 error.
I decided to use directory URLs, now I'm fine! Thanks..
is working on a reply...