Currently the site due to culture settings has 2 different url for each page as seen by google.
domain.com and domain.com/en
I want to get rid of the /en virtual path by removing it from the culture settings however does anyone have an idea on how I can handle the redirects. It's impracticable to do them individually as the site has over 3000+ pages.
I.e.
domain.com/en/blog
needs to redirect to
domain.com/blog
UrlRewriting.config addition worked but the rule for the web.config didn't work as expected. Any further advice would be appreciated as the rewrite will be needed long term and UrlRewriting.config is becoming deprecated in Umbraco 8.
The URL Rewriting rule also create errors when ever a "en" appears in a link. Removing the tilde allowed it to work.
Remove URL Segment
Currently the site due to culture settings has 2 different url for each page as seen by google.
domain.com and domain.com/en
I want to get rid of the /en virtual path by removing it from the culture settings however does anyone have an idea on how I can handle the redirects. It's impracticable to do them individually as the site has over 3000+ pages.
I.e. domain.com/en/blog needs to redirect to domain.com/blog
In /Config/UrlRewriting.config you can add:
If you are using IIS7+ you can use Url Rewrite Module - http://www.iis.net/learn/extensions/url-rewrite-module/url-rewrite-module-configuration-reference
In web.config you can add:
UrlRewriting.config addition worked but the rule for the web.config didn't work as expected. Any further advice would be appreciated as the rewrite will be needed long term and UrlRewriting.config is becoming deprecated in Umbraco 8.
The URL Rewriting rule also create errors when ever a "en" appears in a link. Removing the tilde allowed it to work.
If you dont want to go with UrlRewriting.config then I have testet this one with success:
If it does not work, then try to enable failed request tracing and see if you can see the error: http://www.iis.net/learn/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
BTW - if you are not running IIS express then you can use the IIS Manager -> Url Rewrite tool to test your rules.
is working on a reply...