1

I use the javascript redirect function, to redirect whenever a form has completed the processing.

It use it like this:

redirect("?i=login"); //On the page. http://www.domain.com/folder/?i=index

Although, it redirects to: http://www.domain.com/folder/www.domain.com/folder/?i=login

Why is that?

Oliver 'Oli' Jensen
  • 2,631
  • 9
  • 26
  • 40
  • well probably the way your redirect function has been set up, maybe you should use, `redirect('/?i=login')` or the full url, or if you want it to rewrite it let us know. – Val Aug 16 '11 at 09:03
  • Is the redirect function made by you or does it come from a library? – JJJ Aug 16 '11 at 09:03
  • Take a look at this question: http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery – daniel Aug 16 '11 at 09:04
  • 1
    If you ask what's wrong with a custom function and you don't post the function code, what kind of answers do you expect? – Álvaro González Aug 16 '11 at 09:06

1 Answers1

2

Use window.location.assign('?i=login');

Emil Ivanov
  • 37,300
  • 12
  • 75
  • 90