Redirecting via .htaccess to .php with arguments in current folder.
- by Jengerer
Hey,
I'm trying to redirect something like foo/bar to ?foo=bar, so I can do www.mydomain.com/hey/foo/bar to www.mydomain.com/hey/?foo=bar, but I can't seem to get the syntax right. I tried the following:
RewriteEngine on
RewriteRule ^foo/(.*)$ ?foo=bar [NC]
But this doesn't work. How would I accomplish this? I tried adding a forward slash behind the question mark, but that makes it link to the root directory.
Thanks,
Jengerer