问题
I have created a simple page using Symfony 2.1 and jQuery Mobile 1.1.1. My whole page is behind a firewall.
After logging in, the menu appears well, but the URL in the window's location bar is localhost/mobile/web/app_dev.php/loginCheck (which is Symfony's login_check URL). When I navigate to another page by using one of my menu buttons, everything goes fine, but when I press the Back button in the new page's header, it tries to go back to the loginCheck page, which, of course, fails, as loginCheck is an invalid route. Has anyone faced this problem before?
回答1:
As I mention in my comment, if I specify my form as
<form method="post" action="{{ path('login_check') }}" data-ajax="false">
Everything works as expected. This, however, should be considered as a workaround, I think.
来源:https://stackoverflow.com/questions/12516902/symfony-2-and-jquery-mobile-1-1-1