ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Weird contact form redirection

October 26, 2010 10:40am

Subscribe [3]
  • #1 / Oct 26, 2010 10:40am

    FuturShoc

    71 posts

    I’ve added a basic email contact form to a few of my EE templates. They work fine and I receive the email just as expected.

    However, once the form is successfully submitted, the page redirects to the page I was on *BEFORE* I visited the contact form page.
    So, if A is the form page…
    I submit the form, then I’m redirected to page B.
    If I then visit page C and come back to page A, I’m redirected to page C again after form submittal.

    This happens whether I include an explicit redirect parameter or not. Doesn’t matter. Same behavior.

    Anyone have thoughts?

  • #2 / Oct 26, 2010 12:26pm

    FuturShoc

    71 posts

    Ok, I’ve looked into this further and discovered that if I write the return parameter as return=”{site_url}index.php/foo/bar” which includes the “index.php” segment, the redirection will go where I want after submittal.

    If I use…

    return="{site_url}foo/bar"

    ... it doesn’t redirect properly

  • #3 / Oct 27, 2010 3:12am

    John Henry Donovan

    12339 posts

    FuturShoc,

    We do not support the removal of index.php via a htaccess rewrite. Your return works with index.php in place so you must investigate your rewrite further if it is breaking default functionality.You may find more info in this Wiki article

  • #4 / Oct 27, 2010 10:42am

    FuturShoc

    71 posts

    Ok, thanks, John.
    I wasn’t intentionally doing one thing or another on the rewrite front, but I’ll look into that.
    Meanwhile, I have a method that works with redirection, so that helps in the near term.

  • #5 / Oct 27, 2010 5:28pm

    Ingmar

    29245 posts

    Very glad to hear that. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases