Topic: Redirect non-www to www with .htaccess

Hi guys!!

One problem in my website about SEO.

I want to redirect www to non-www with .htaccess but I dont know how to do it , exactly http://www.ps3pirata.com to http://ps3pirata.com

Here my code of .htaccess

deny from 126.57.202.171

#deny from all
#ErrorDocument 403

# BEGIN PunBB

<IfModule mod_rewrite.c>
# MultiViews interfers with proper rewriting
Options -MultiViews

RewriteEngine On

# Uncomment and properly set the RewriteBase if the rewrite rules are not working properly
#RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . rewrite.php [L]
</IfModule>

# END PunBB

Anyelse??

THANKS!

2

Re: Redirect non-www to www with .htaccess

Add at the end of the file:

RewriteCond %{HTTP_HOST} ^www.ps3pirata.com$ [NC]
RewriteRule ^(.*)$ http://ps3pirata.com/$1 [R=301,L]

Re: Redirect non-www to www with .htaccess

thanks , finally I get it