I switched forum platforms and I’d like to redirect requests to member profiles using a 301 redirect.
The old platform path to user profiles was: http://www.example.com/forum/member.php?u=XXXXXX
The new platform path to user profiles is: http://www.example.com/user/XXXXXX
The user IDs have remained the same during the switch.
I tried to accomplish this by writing the following RewriteRule:
RewriteRule ^forum/member.php?u=(.*)$ http://www.example.com/user/$1 [R=301,L]
Unfortunately, it’s not working for some reason and I can’t figure out why. Any help would be greatly appreciated!
Thanks,
-Chris
You cannot access the query string from a RewriteRule directive.
Try the following instead.