Forum Moderators: phranque
1. This is how i call the user info:
RewriteRule ^users/([A-Za-z0-9_-]+)/?$ /data.php?user=$1 [NC,L][b]
2. I go to:
[b]http://domain.com/users/asantos?msg=5
3. I only receive this data:
$_GET['user'] = 'asantos'
$_GET['msg'] =
Im not getting the value for "msg". Why?
RewriteCond to test the {QUERY_STRING} to extract that value, and then pass it over in %1 (that's %1 with a % sign). If you are using
[NC] then you don't need both A-Z and a-z to be specified; the [NC] means "use any case". Don't make the trailing slash on the URL as optional. That would mean that two different URLs would be able to access the same content. Don't create your own Duplicate Content problem here.
Before this rewrite, you also need to add a 301 redirect from non-www to www in order to suppress yet another potential Duplicate Content issue.
One page should be accessible at one and only one URL. As gismd says, any change at all to the URL should result in either a 301 redirect to the correct URL, or a 404 Not Found response. HTTP vs. HTTPS, www.example.com vs. example.com, uppercase vs. lowercase vs. mixed-cased -- all of these and more are different URLs.
Jim
By following your recommendation, i guess this is whats right:
[domain.com...]
[domain.com...]
[domain.com...]
[domain.com...]
(where this is like seeing a FTP file list)