Start a new topic
Answered

Removing language prefix and store name from URL

Hi all,


Is it possible to remove  language prefix and store name from the home page URL?


I'm trying to set a single store, single language site. So I don't need this part in my store URL: "/en-us/electronics". I hope there is a way to use just root URL for the home page.


This won't desirable in your brand home page link in search engine results.


Best Answer
Hi,

Yes language will be removed if current store has only one language and store will be removed if there is only one open store or store has Url defined .
This change currently is only in our dev branch.

Br,
Adomas

 


2 people have this question

Было бы здорово, если появится такая настройка, которая бы убирала бы префикс языка из URL.

 

 Hello,


It is possible not to show store in url if you go to store settings and set Store url or Store secureUrl.

This must be root url of you site, then store is not used in routing. Check the code StoreRoute.cs.


For language this is not possible, but probably it is possible to remove it from route in same way. The code could check that store has only one language available and in that case remove it from url.


Thanks,


Adomas

Thank you! I applied particular changes from dev and now it works.


Br, rk.

Hi all,

did you eventually manage to remove lang from URL?


Thank you,

rk.

Answer
Hi,

Yes language will be removed if current store has only one language and store will be removed if there is only one open store or store has Url defined .
This change currently is only in our dev branch.

Br,
Adomas

 

Login or Signup to post a comment