Not able to match existing route path and getting 404 Not Found

Skip to first unread message


Apr 24, 2014, 9:46:12 AM4/24/14
Hello everyone, 

I have following html markup where the action is one of the route path defined in sammyjs routing code:

<form id="loginform" action="#/login" method="post" class="form-horizontal">

<!-- input & hidden elements -->

<!-- submit button -->


if the above view was loaded via url like "http://localhost:xxx/Account/Login", when I submit the above form, sammyjs logs the error that it is not able to find the route:

I'm not able to to understand why does sammy look for "/Account/Login#/login" as my form action is set to "#/login".

I have also tried changing my script below for the route path mentioned in error above, like from "#/login" to "/Account/Login#/login", but again I get the same error as mentioned in the link above.'#/login', function (context) {

Same happens with other links or form tags. the hash tag that I want to use get suffixed to whatever is in the url like "/Account/Login#{/any_hash_tag}".
What should I do to solve this?

However, everything works fine if the view was loaded via url like "http://localhost:xxx/" that is with no other route parameters.

It would be great to know if there is something that I'm doing wrong.


Reply all
Reply to author
0 new messages