We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27072
    • 76 Posts
    Hello,

    Firstly, when I do not use URL Prefix in Tools -> Configuration -> Friendly URLs, the generic Contact Us form that I included in the installation works fine. I.E. it sends the visitor to the Thank You page upon successful submission.

    However, I do set a placeholder via snippet call that is used as URL Prefix (Prefix for friendly URLs: [+URLPrefix+]/). The need has aroused because MODx does not parse placeholders in the Document’s alias.

    When I fill in the Contact Us form and click the "Send This Message" button, the following error is received by Windows IIS on my local machine:

    HTTP Error 404.11 - Not Found
    The request filtering module is configured to deny a request that contains a double escape sequence.
    Requested URL	http://celebrities.topsynergy.com:80/[+URLPrefix+]/contact-us/
    Physical Path	c:\Webs\MODx Projects\Celebrities\[+URLPrefix+]\contact-us\
    


    It seems apparent the [+URLPrefix+] is not parsed.

    Can you help me please with possible solutions? Thank you.
      Cheers,
      Shlomo Tommer
      • 30223
      • 1,010 Posts
      It would be helpful if you provided the snippet call and any code (and form template).

      In general though, modx placeholders are not ’parsed’ when you are redirecting or forwarding. They are only parsed while modx compiles the document content. You would have to write some code yourself (for one of eForms events for example) to build the proper url to forward to.
        • 27072
        • 76 Posts
        Thank you for your guidance.

        The snippet code is:
        $modx->setPlaceholder('URLPrefix', "");
        , and it is called from the template.
        However, your latter statement says it all - no document parsing on redirect of forwarding!
        Pity, but it seems that it would be an easier task to write my own contact form than to tackle eForms’ events for URL redirection.
        I will also try to mess around with .htaccess and see if I can get anywhere with it.
        Thanks again.

        Quote from: TobyL at Jul 05, 2009, 10:10 AM

        It would be helpful if you provided the snippet call and any code (and form template).

        In general though, modx placeholders are not ’parsed’ when you are redirecting or forwarding. They are only parsed while modx compiles the document content. You would have to write some code yourself (for one of eForms events for example) to build the proper url to forward to.
          Cheers,
          Shlomo Tommer