BAER BAER - 3 months ago 17x
AngularJS Question

AngularJS + Domain/URL Redirect not working well together

I got a small angularJS based website.

I am hosting it via the service OpenShift on some domain like:

Which is of course not that pretty, so I ordered a TLD:

from There I habe three possibilities to achieve my goal, see the screen (sorry it is in German - it is: 1) Header redirect, 2) Frame-redirect or 3) URL-Hiding)
enter image description here

But none of these seem to work like I want:

1) Simply redirects the user, so the ugly URL is shown again.

2) Shows my pretty URL, BUT I can't type in like /#/stuff/some/page, it simply does nothing and remains on the start screen. My
doesn't trigger that URL like it normally does.

3) Here everything works just fine. I can use Angualr as I'm used to, the above error disappears + the URL is still pretty. BUT: Now I can't send POST Requests with payload to my Java Spring MVC Backend. I get an 415 Error (See second Screen). When using the ugly URL it works perfectly (Everything). It also works using GET methods.

enter image description here
The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.

Does anyone might have an idea? How can I get 2) or 3) working? I don't get what's going wrong.
If code (angular or Spring Controller) is needed, tell me - but as said, it works under DEV and when using the ugly URL.


A solution for me was to use another (sub) domain like, which does a frame redirect to the /#/stuff/some/page URL, automatically triggering my intended behavior.