Grow your CSS skills. Land your dream job.

Difference between [R] and [R=301] apache

  • # October 25, 2013 at 1:15 pm

    Is there any difference between a redirect using [R] vs [R=301] in the .htaccess?

    From my understanding…

    [R] instructs Apache to issue a redirect, causing the browser to request the rewritten/modified URL.

    and

    301 Request has Moved Permanently

    # October 25, 2013 at 3:54 pm

    haha I feel like you just answered your own question?

    # October 25, 2013 at 4:59 pm

    @thedoc

    By definition…probably. But there doesn’t seem to be any difference in the actual result… at least from what I’m noticing. So im wondering if there ‘s something different that I’m missing…is one considered better to use…etc

    The only difference I can think of is that [R] doesn’t change the http header status, while [R=301] will obviously display a 301. That assumption doesn’t have any documentation to back it up, which is why I ask.

    # October 25, 2013 at 11:41 pm

    [R] should do a 302 redirect by default (i.e., if you don’t specify a status).

    If it’s doing a 301 by default, that’s …odd

    mod_rewrite [R] flag

    # October 28, 2013 at 8:07 am

    It has significant SEO implications: http://moz.com/learn/seo/redirection

    # October 28, 2013 at 1:59 pm

    Rather than saying “301 is best for SEO” and “don’t use 302″, it should say, “if the redirect is permanent, 301 is best for SEO.” If the redirect really is temporary, then sending a 301 header could be disastrous once you go back to using the original URL.

    # October 29, 2013 at 11:11 am

    Thanks for the updates guys!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".