The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

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.


    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

    This reply has been reported for inappropriate content.


    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:

    # 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

    This reply has been reported for inappropriate content.

    Thanks for the updates guys!

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed