We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46315
    • 30 Posts
    Hi, i'm very new to posting here so apologies if wrong format or wrong place.

    I'd like to know if it is possible to create a "custom" friendly URL like:

    from: domain.com/index.php?id=18&Pref=R1234

    to: domain.com/product/a-must-have-product-R1234

    I updated .htaccess (with my limited know how) to:

    # The Friendly URLs part
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^product/(-[^/]+)([0-9]+)?$    index.php?q=18&Pref=$1 [L,QSA]
    
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


    ..but this only results in a 404 error page.


    Setup:
    Revolution 2.2.14
    Use Friendly URLs = Yes

    This question has been answered by bvirtual. See the first response.

    [ed. note: bvirtual last edited this post 12 years, 4 months ago.]
      • 4172
      • 5,888 Posts
      you can use a plugin, which handles the forward on the system-event OnPageNotFound
      for example this one

      http://modx.com/extras/package/customrequest
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 10208 ☆ A M B ☆
        • 1,780 Posts
        Why not just name your pages and/or aliases with what you want and turn FURLs on?

        Sorry, but what you want can be done with resources and aliases easy. Create a parent resource, then create some children as products. The url will reflect this if you have FURLs enabled.

        It also does not appear that you have FURLs turned on if you're still getting paths like domain.com/index.php?id=18&Pref=R1234
          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 4172
          • 5,888 Posts
          I thought he was talking about having FURLs for items of a custom-table
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 46315
            • 30 Posts
            Thanks bruno17 and frogabog for the reply.

            Bruno17 you were correct, I am using furls for custom table, sorry I should have stated that.

            I'll try the customrequest extra suggestion and let you know.

              • 10208 ☆ A M B ☆
              • 1,780 Posts
              I did not recognize the url. My custom tables aren't real tables yet today.

              Now I return to MIGXdb figuring.
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 46315
                • 30 Posts
                Hi All

                I tried http://modx.com/extras/package/customrequest but I just could not get it to work.

                I've scoured the forums and have tried many other ideas but have come up short, are there any other options?

                This seems to be a tough one.

                Thanks in advance.
                • discuss.answer
                  • 46315
                  • 30 Posts
                  If anyone else is interested, I finally stumbled upon this thread which helped me out:

                  https://forums.modx.com/thread/?thread=15125

                  A special thanks to freejung