We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17499 ☆ A M B ☆
    • 872 Posts
    Hello,

    I’ve already posted my question in the French forum but nobody seems to have any answer.

    I’ve successfully installed the Friendly URLs part, and the languages snippet.

    Now, the site start page have a form. When submitted the URL is like: http://www.mysite.fr/fr/welcome.html?var=something

    I would like to set a different URL Rewriting like http://www.mysite.fr/fr/welcome-something.html or http://www.mysite.com/fr/something/welcome.html

    I’ve been trying for days to set the htaccess file with rewritecond, querystring, etc, but nothing seems to work.

    Anybody nows how to achieve this kind of URL Rewriting with Modx?
      • 17499 ☆ A M B ☆
      • 872 Posts
      We!l, nobody’s seems to answer!

      Maybe the question was not interesting to begin with.

      It’s a pity, maybe someone could at least tell me that "this is not possible" or at least a "You already have a built in URL Rewriting engine or SEO strict Plugin, if you want more, code it yourself", but nothing at all.

      No wonder why joomla still got the leadership.

      It’s not a question of letting someone do the job or, abandonning ModX which is far, far more flexible and enjoyable.
      But the fact is that, even in the english community, i receive absolutely no answer either positive or negative.

      It’s my "coup de gueule" for today >:(.

        • 32646
        • 87 Posts
        These are my settings for FURLs:

        Use friendly URLs: Yes

        Prefix for friendly URLs:

        Suffix for friendly URLs: /

        Use friendly aliases: Yes

        Use friendly alias path: Yes

        Allow duplicate aliases: No

        I’m not sure what your var is. Is it a different page?
          Just learning the ropes.
          • 7231
          • 4,205 Posts
          Use post instead of get in the form and the ?var= will not be visible.

          As far as I know, to get the URL that you are describing you need to have a document with that alias, the system will not rewrite the alias dynamically according to variable settings.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 17499 ☆ A M B ☆
            • 872 Posts
            Thanks for both your answer.

            In fact, i would like to see this variable in the URL in order to access the site later via direct URL.
            It’s not possible to duplicate each document in order to give them the desired aliases (way too long and not convienent).

            I maybe have not well explained what i try to achieve, and, i think that it is not possible to do it with modx without hacking o bit.

            Here is my configuration:

            The welcome page is like below:

            www.mysite.com

            Containing a form allowing to select a brand.
            Once validated it send the user to another page via GET:

            www.mysite.com/fr/bienvenue.html?brand=choice

            I really need to view the brand in the URL, and i would like to set the url like

            www.mysite.com/fr/bienvenue-choice.html or www.mysite.com/fr/bienvenue-choice2.html for example.

            In many tutorials they explain that it’s possible to catch the form submit and rewrite the url via the QUERY_STRING parameter.
            I’ve been playing with the parameters but it doesn’t work wich seems to be a limitations of Modx (or most likely, a limitation of my coding skills tongue)

              • 7231
              • 4,205 Posts
              I think that it may be possible but you would need to take into consideration that by default this URL www.mysite.com/fr/bienvenue-choice2.html will be interpreted by FURL as: look in container "fr" for a child document with the alias bienvenue-choice2.

              I have no idea how you could do this. It may be easier to have www.mysite.com/fr/brand/bienvenue-choice2.html since you could use the "brand" expression to identify that this is a parameter as well and treat it differently.
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 17499 ☆ A M B ☆
                • 872 Posts
                Unfortunately, i will have to stay with www.monsite.com/fr/bienvenue.html?brand=choice for now

                In fact, Someone already told me to do the alias thing, but, i have more than 30 brands, and the get must be passed from page to page, so it’s kind of too long to duplicate each documents for each brand, and i don’t even want to think of documents updates.

                Anyway, thanks for your help!