Question: The site has 2 languages: English and French, represented by 2 store views. French is the default one. For our SEO efforts we need to have the following urls:

1. French - <http://www.domain.com/category/product>
2. English - <http://www.domain.com/en/category/product>

System -> Configuration -> Web -> Add Store Codes to URL is the all or nothing setting. We just need to turn it off for the default store only.
I’ve done a lot of searching through the forums and wiki but there’s nothing on the subject. 

Please any sugestions?

Answer: 
I was having the same problem and I had already selected to not show store code in url in the config. I also didn't want to install an extension just to handle something this minor. Here's my EASY solution:

Copy `app/code/core/Mage/Catalog/Block/Widget/Link.php` to `app/code/local/Mage/Catalog/Block/Widget/Link.php`

Search for (line 91 in Magento 1.7.x / line 100 in Magento 1.9.x)

> 
> $this->\_href = $this->\_href . $symbol . "\_\_\_store=" . $store->getCode();
> 
> 
> 

And modify to

> 
> $this->\_href = $this->\_href;
> 
> 
> 

Upload and save your changes and you'll now not have your widget (dynamically) inserted links getting appended with ?\_\_\_store=default.

Credit: [DesignHaven](https://www.designhaven.co.uk/2013/10/force-removal-of-store-code-default-from-urls-in-magento/)
Under System -> Configuration -> Web -> URL Options you 
change "Add Store Code to Urls" to "NO" as on the attached screenshot
![enter image description here](https://i.stack.imgur.com/PG37W.png)