Hi, I've found many variants of code to make 301 redirect from www to no-www domain or vice versa, can anyone confirm if below codes are universal enough to use them in any case? 1. From No-www to www redirect: <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / Rewritecond %{http_host} ^domain.com [nc] Rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] </IfModule> Code (markup): 2. From www to No-www redirect: <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / Rewritecond %{http_host} ^www.domain.com [nc] Rewriterule ^(.*)$ http://domain.com/$1 [r=301,nc] </IfModule> Code (markup): Are all above lines necessary? Can I omit something? 3. I saw below code in some cases. Should it be added to above lines? Options +FollowSymlinks Code (markup): What this "operator" does? "^" Code (markup): 4. Is this way of creating .htaccess file appropriate? Create .htaccess file: Go to Notepad, copy-paste above code in and save it as htaccess.txt. Upload it in a root directory on your site and rename it in .htaccess . 5. Immediately after that check server header with this tool: http://www.webweaver.nu/tools/server-headers/ . It should tell you that 301 permanent redirect has been done. Is this OK?
Great! So, you all agree above codes are OK? Just to be sure, can some programmer please copy and paste below in the thread: 1. I agree 2. Do not agree (tell what's wrong then).
I also need the info--I am worried that my PR will be divided between the two URLs. Someone-- technically adept-- please let us know.