hi
I need to redirect using mod_rewrite this type of url
http://mysite.com/user/index.php?id=23322
to this:
http://mysite.com/archive/old_user/index.php?id=23322
I need it to NOT display the destination url to the user's browser so the user thinks he is still in the previous one. (he needs to see "user" not "archive/old_user"
searching this topic I think this will do it:
Code:
RewriteEngine on
RewriteBase /
RewriteRule ^/user/(.*) /archive/old_user/$1 [P,L]
or
Code:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/archive/old_user/
RewriteRule ^/user/(.*) /archive/old_user/$1 [P,L]
are those correct ? which one is better ? which one is safer ? which one will load less on the server/apache ?
also does anybody know a good online mod_rewrite tool that you can input the url, the mod_rewrite syntax and than it gives you result ?