Forum Moderators: phranque
With either a 301 or 302 redirect, the visitor's browser address bar will update to show the new URL. In these cases, the server sends an initial response to the browser containing either a 301-Moved Permanently or 302-Moved Temporarily status code, along with the new URL. The browser then updates its address bar and uses the new URL to re-request the desired object in a second HTTP transaction.
Server-internal redirects, where the URL is rewritten with mod_rewrite to specify a different local file path, are not visible.
Visible:
RewriteRule ^foo\.html$ /bar.html [R=301,L]
RewriteRule ^foo\.html$ /bar.html [R=302,L]
RewriteRule ^foo\.html$ /bar.html [R=permanent,L]
RewriteRule ^foo\.html$ /bar.html [R=temp,L]
Redirect permanent foo.html [yourdomain.com...]
RedirectPermanent foo.html [yourdomain.com...]
Redirect 301 foo.html [yourdomain.com...]
RedirectMatch 301 ^foo\.html$ [yourdomain.com...]
Redirect temp foo.html [yourdomain.com...]
RedirectTemp foo.html [yourdomain.com...]
Redirect 302 foo.html [yourdomain.com...]
RedirectMatch 302 ^foo\.html$ [yourdomain.com...]
Invisible:
RewriteRule ^quux\.html$ /foo.html [L]
Jim