How would you redirect (301?)?:
test.com/?dep=CAR (the variable is dynamic, whatever comes after the=)
to a subdirectory:
test.com/CAR/
This is what I’ve got so far:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^dep=(.*)
RewriteRule ^.* / [L,R=301]
I test this on a localhost (WAMP).
And the main directory is localhost/newsite/
(localhost/newsite/?dep=CAR)
, but I guess that shouldn’t matter? Online or localhost.
Try the following