schmittjoh / JMSI18nRoutingBundle

Allows you to internationalize your routing
http://jmsyst.com/bundles/JMSI18nRoutingBundle
358 stars 159 forks source link

Host exclusion #186

Open DaGLiMiOuX opened 8 years ago

DaGLiMiOuX commented 8 years ago

Hi there.

We are using your routing bundle in our Symfony project and I was trying to find a way to exclude a subdomain from routing. We are using an API in a subdomain to keep things organized, but when I try to access to the root url of the subdomain, it adds a language in the URL. E.g.:

Accessing to domain normally: http://example.com/ changes URL to: http://example.com/en/ - Perfect Accessing to API: http://api.example.com/ changes URL to: http://api.example.com/en/ - Wrong

We want to prevent doing that on the specified subdomain and any URL that maches that subdomain. How should we do it?

Thanks in advance, Regards.

Diego.

HappyPaul55 commented 8 years ago

Reading the docs: http://jmsyst.com/bundles/JMSI18nRoutingBundle/master/usage I personally would add options: { i18n: false } to the controllers for the API. Alternatively write your own strategy.