We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37909
    • 153 Posts
    Hi!

    I have a page (my-page.html) where I have several content created by a personal database. So, I want to access to each content individually. The easy way is to put variable into the URL like this:
    my-page.html?page=my-second-content
    And I can get the variable with a simple $_GET
    But it's not a friendly URL solution. I want this:
    my-page/my-second-content.html
    However, this URL display the homepage of course.
    I think that the solution is to change the .htaccess file, but I'm not sure and, most important, I don't know how (properply). Or, maybe you have another way.

    Someone can help me? Please.

    Thanks.

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

      • 4172
      • 5,888 Posts
      can be done with a plugin at OnPageNotFound, for example the customRequest - Extra:
      https://modx.com/extras/package/customrequest
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 37909
        • 153 Posts
        But, it’s a Revo Extra :-(
          • 4172
          • 5,888 Posts
          sorry, didn't see it was for EVO. Then I don't know, if there is a OnPageNotFound - Event, but I think it should.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
          • discuss.answer
            • 37909
            • 153 Posts
            I found a solution with .htaccess

            # Personal request
            RewriteRule my-page/(.*)$ my-page.html?filter=$1 [L,N]
            
            # For Friendly URLs
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]