I have an AngularJS 1.0.7 web application.
In my app.js:
$routeProvider.when('/:language/alquiler-barcos-:departure', {templateUrl: 'partials/boat-rental.html', controller: 'Controller1Ctrl'});
$routeProvider.when('/:language/boat-rental-:departure', {templateUrl: 'partials/boat-rental.html', controller: 'Controller1Ctrl'});
This will let this correct URLs like: http://domain/es/alquiler-barcos-mallorca or http://domain/en/boat-rental-majorca. This is right.
However, it will also let http://domain/es/boat-rental-mallorca or http://domain/en/alquiler-barcos-majorca which is wrong (or should be, because it´s mixing languages in the URL).
I would like to avoid this, because I think this is not nice from SEO point of view. First, I would like to clarify which is the best practice from SEO point of view in this scenario:
To redirect http://domain/en/alquiler-barcos-majorca to http://domain/en/boat-rental-majorca and show the results
To control the URL and redirect to a 301 error page.
To control the URL and redirect to home page.
After that, is there any way to control these combinations in an AngularJS way in the app.js? Or should just to parse the url in the controller and control it "manually".