I am trying to use rewrite rules to mask and access URL#2 using URL#1
URL#1 http://www.domain.com/user/username/send
URL#2 http://www.domain.com/user.php?user=username&action=send
URL#1 http://www.domain.com/user/username/receive
URL#2 http://www.domain.com/user.php?user=username&action=receive
the only two variables are username and send/receive
The first thing you need to do is change all of the links in your content from the one with the user and action query string to the one that has the clean looking URLs (e.g.
http://www.domain.com/user/username/send). Then you need to add this to the htaccess file in your document root (your webroot, wherehttp://www.domain.com/points to):It’s possible that you have links outside of your site (like on google) that still point to the URLs with the query strings. If so, you need to externally 301 redirect requests for them to the clean looking URLs: