Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other .htaccess 301 redirect vs rewriteRule?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #42574
    Eric
    Member

    Hello. I’ve changed domains and have almost finished moving it all. 800+ pages. Took me awhile. The folder structure has changed in the new domain. So it will make this easy. I simply want to take all traffic from the old domain and redirect it to the root of the new domain. Now my only question that remains is which way is better?

    Redirect…

    Redirect 301 / http://www.example.com/

    Or rewriteRule…

    Options +FollowSymLinks
    RewriteEngine on
    #
    RewriteCond %{HTTP_HOST} !^www.newdomain.com
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

    Anyone have any knowledge about this? Only forums I know that do don’t like answering these redirect questions as they have seen them a lot.

    Thanks!

    Eric, W

    #123818
    TylerNYC
    Member

    301 is basically for users who do not have mod_rewrite. Either way is fine.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.