JMSI18nRoutingBundle icon indicating copy to clipboard operation
JMSI18nRoutingBundle copied to clipboard

Host exclusion

Open DaGLiMiOuX opened this issue 10 years ago • 1 comments

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.

DaGLiMiOuX avatar Apr 11 '16 10:04 DaGLiMiOuX

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.

HappyPaul55 avatar Jul 04 '16 23:07 HappyPaul55