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

    I’ve successfully implemented the friendly urls in my modx revolution site. But now i need one more custom rewrite rule in my .htaccess file for simplesearch:

    I would like the following url to be rewritten:

    http://www.mysite.nl/index.php?search=multimedia&id=14&x=21&y=19

    to something like (or even better if you know something):

    http://www.mysite.nl/search/multimedia&id=14&x=21&y=19

    The reason i want this, is because i want the better readable url and i don’t wan’t google to index www.mysite.nl/index.php?etc...

    I’ve been experimenting with this mod_rewrite for a while now and nothing seems to work. Any help would be appriciated!

    Kind regards,

    Mayhem

      • 10189
      • 109 Posts
      Sound like you just need to enable friendly URLs to begin with. SimpleSearch also allows you to customize your query string using &searchIndex. I do realize that is not exactly what you are after since the URL would be something like this:

      http://www.mysite.com/search/?search=term&id=14


      But it’s a start. smiley I’m actually doing some testing with this myself, but I’ve yet to find a nice solution to it. Will post back if I do.
        • 28215
        • 4,149 Posts
        RewriteRule ^search/([A-Za-z0-9]+)$ search/?search=$1 [L,QSA]
        

        Should work.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 10189
          • 109 Posts
          Did a quick test and I didn’t get it to work. I think something’s missing, but not figured out just what yet. I’ll have to take a closer look tomorrow since it’s getting close to midnight over here. smiley