We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7914
    • 137 Posts
    I am creating a page where a user can set some preferences, and based off of those preferences they will be taken to "x" page.

    I am using makeUrl to generate the url, and then sendRedirect to actually move the user along:

    $choice_url = $modx->makeUrl(42);
    
    $modx->sendRedirect($choice_url, 0, 'REDIRECT_HEADER', 'HTTP/1.1 300 Multiple Choices');
    



    Everything is working...just a little too well. When I trace out the value of $choice_url I get something like "http://mysite.commypref.html"

    I must be missing or incorrectly setting a parameter somewhere? I am looking for "http://mysite.com/pref.html"

    Thank you for your time!
      • 17499 ☆ A M B ☆
      • 872 Posts
      Did you the base html tag in your header ?
        • 7914
        • 137 Posts
        Thanks lossendae,
        Yeah, it looks like I have that. I failed to say in my post that I am linking to a sub-domain context. I don’t know if that is the cause of my troubles or not. I have "<base href="[[++site_url]]" />" in both contexts.

        I am able to brows around each context, "http://mysite.com/mypage" and "http://sub.mysite.com/mypage"
          • 36493
          • 64 Posts
          Do you have these context settings in your sub.mysite.com/ context:

          site_start - Set this to the ID of your "Dev Home" resource.
          base_url - Set this to "/" (no quotes) since we’re making the root of the URL our base.
          http_host - Set this to "dev.modxcms.com" (or your subdomain name)
          site_url - Set this to "http://dev.modxcms.com/" (or your subdomain url). Don’t forget the trailing slash. Remember this setting is (scheme+http_host+base_url).

          please note for my install of 2.0.2, changes to already set context settings will not save. but deleting a setting then adding it back in with the change works

            |
            • 7914
            • 137 Posts
            Quote from: no at Sep 22, 2010, 09:39 PM


            site_url - Set this to "http://dev.modxcms.com/" (or your subdomain url). Don’t forget the trailing slash. Remember this setting is (scheme+http_host+base_url).


            I did have that...only no trailing slash. *slaps forehead* Thank you!!