1

I have installed Magento ce 1.9.2.4 for my website.

Now I have setup the stores in such a way that my every url has store code of the current store, visitor is in, appended to it.

For business(bedrift) store the store code being appended to url like http://example.com/bedrift is fine but I want to remove default store code from urls so my urls become from http://example.com/default to http://example.com but the store session is maintained.

I have tried with .htaccess but it creates infinite redirects and then browser shows error.

Can anyone help me fix this the Magento way ?

2 Answers 2

1

Go to system->Configuration. Then go to web tab. You can see there is an option 'add store code to url set that option to no.. It will remove the default word from your url

21
  • Oh I tried that but that creates error in bedrift store redirection, as I cannot change my stores even by clicking the link.
    – Vicky Dev
    Apr 21, 2016 at 5:29
  • what do you mean by bedrift??
    – Asish Hira
    Apr 21, 2016 at 5:32
  • Consider it an example it is my store code. It means "business".
    – Vicky Dev
    Apr 21, 2016 at 5:52
  • and what error you found when you changing the store?
    – Asish Hira
    Apr 21, 2016 at 6:05
  • 1
    Well the problem is when I turn off Add Store Code to Url I can change the stores just fine, but when I click on the other links like "Login" or "My Account" the system fails to maintain the store session and redirects me to those pages of the default store only.
    – Vicky Dev
    Apr 21, 2016 at 6:41
0

there is extension developed for it. it solved all problem of default store code(http://example.com/default to http://example.com).

enter image description here

Extension available on github. click here

i solved this Problem , i hope that's save others Person here is the details :

1- Download the zip existe in this page : https://github.com/lalitmohann/magento-hide-default-store-code

2- unzip the file and put the folder in app/code/community/ and Bubble_HideDefaultStoreCode.xml file in app/etc/modules

3- In your backoffice go to System > Tools > Compilation and click the rebuild button

4- always in backoffice got to System > Configuration > Web > URL options and set the attribute "and default store view" to No and save the configuration

5- Clear your cach magento and enjoy your application

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.