This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redirecting www to non-www?
04-27-2014, 10:39 PM
Post: #1
Redirecting www to non-www?
Hi, I'm using wordpress and I want to use domain.com instead of http://www.domain.com

I read the best method to avoid problems in the search engines is to go into cpanel and edit the .htaccess file to redirect. However I found 2 difference pieces of code online and since I'm not up on this, just needed some help.



FIRST SAYS THIS CODE:

<ifmodule mod_rewrite.c="">
RewriteEngine On
RewriteBase /
RewriteCond % ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
</ifmodule>




SECOND SAYS THIS CODE:

RewriteEngine on
RewriteBase /

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



Really appreciate some help. Thanks.
I know about the wordpress dashboard settings, but that's not enough is it?

Ads

Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Redirecting www to non-www? - David - 04-27-2014 10:39 PM
[] - Santosh - 04-27-2014, 10:43 PM
[] - Aassif - 04-27-2014, 10:44 PM
[] - Anty Saju - 04-27-2014, 10:46 PM
[] - Kenny - 04-27-2014, 10:52 PM
[] - Mitchel - 04-27-2014, 11:01 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)