Please help a newb . . . how to do a 302 redirect

catseye

New member
Joined
Nov 17, 2013
Messages
1
I recently found out I'm being penalized by google for having double content. I need to do a redirect but what I can't figure out is am I doing www.website.com -> website.com or vice versa? It seems so simple but for me it's hard :(
 
Create a file called .htaccess in your public_html folder with the following code and replace website.com with your actual domain:

Code:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
rewriteEngine On
rewriteCond %{HTTP_HOST} !^website.com [NC]            
rewriteRule (.*) http://website.com$1 [R=301,L]          
</IfModule>
 
Please consider to change the part

Code:
[COLOR=#333333][R=301,L]

to

[/COLOR]
Code:
[COLOR=#333333][R=302,L]

of the code suggested by [/COLOR]scsi

if you need
to do a 302 redirect


 
Back
Top