Okay, so I have a website where the user can put a search query into a form that uses GET to send the data.
When it gets sent, the url looks like: /recipes.php?query=taco&ingredients=chili
And I would like to rewrite it to look like: /recipes-taco-Ichili.html
So I added the following line to my .htaccess file:
RewriteRule recipes\.php\?query=(.*)&ingredients=(.*)$ /recipes-$1-I$2.html [R]
I was under the impression that this would redirect the user to the masked page, but the url doesn't change.
I have RewriteEngine on
and once the url is in the form
/recipes-something-Isomethingelse.html
it works fine.
I have done it in the past using php, but it seemed like it would be nice if I could do it with .htaccess.