Forum Moderators: phranque

Message Too Old, No Replies

301 redirect help

         

tigger

12:29 pm on Jun 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok daft question of the day, I've never used 301's well that’s my excuse :)

If a 301 redirect is used to redirect a page is it visible to the visitor? I mean can he see that he is being redirected? I’m assuming no

wilderness

1:45 pm on Jun 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No a server side 301 in htaccess is not visible to the visitor.

tigger

2:04 pm on Jun 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



cheers :)

jdMorgan

2:44 pm on Jun 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



tigger,

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