Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with @ in URL #56

Closed
fjcero opened this issue Dec 29, 2015 · 1 comment
Closed

Problem with @ in URL #56

fjcero opened this issue Dec 29, 2015 · 1 comment

Comments

@fjcero
Copy link

fjcero commented Dec 29, 2015

Hi! I have the next path in a Angular application:

.state('signup', { url: '/signup/invite/{code:[0-9a-fA-F]{64}}?email&name' });

The thing is to access this using HTML5 mode I added the next config (the same as everyone in the internet) to Grunt to serve the application with modrewrite:

  var modRewrite = require('connect-modrewrite');
  var serveStatic = require('serve-static');
  connect: {
    ...
    middleware: function (connect, options) {
      var middlewares = [];
      middlewares.push(modRewrite(['!(\\..+)$ / [L]']));
      options.base.forEach(function(base) {
        middlewares.push(connect().use(serveStatic(base)));
      });
      return middlewares;
    }
    ...
  }

But then, when I have a URL like: http://localhost:9000/signup/invite/72fa78cbe19327a61cc0ea992f0e341f8cb78266cd248df6cd6650341cf5d4b8?email=example@example.com&name=Its+me+Mario the redirection fails. At first I though it was something in the configuration, but then I started playing with the query string params until I removed the @ and everything goes well.

So, the question is, how could I trace this error and understand better how modrewrite is handling this cases, to fixit or to avoid it.

@fjcero fjcero closed this as completed Dec 29, 2015
@fjcero
Copy link
Author

fjcero commented Dec 29, 2015

Closing until I perform some other tests, but if there is a way to debug modrewrite faster, I will appreciate it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant