Results 1 to 3 of 3

Thread: please help me with redirection

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Question please help me with redirection

    please I am on a vps and there is just one domain (mydomain.com) on the server. I have 2 IPs on this server. eg. IP1: 205.334.56.87 and IP2: 205.334.56.88 IP1 is the main server IP and IP2 is empty. Since there is just one domain on IP1, it is supposed to redirect to mydomain.com anytime I type 205.334.56.87 in the address bar but it doesn't redirect. I was having problems with googlebot because googlebot indexed both 205.334.56.87 and mydomain.com versions of the contents of my website and google reported those as duplicate contents. What i did was that, I logged in to cpanel and added these 2 lines to my .htaccess file
    RewriteCond %{HTTP_HOST} ^205\.334\.56\.88
    RewriteRule (.*) http://mydomain.com/$1 [R=301,L]

    which redirected IP1 205.334.56.88 to mydomain.com without any problem. It helped got rid of the duplicate contents in google. However, I updated apache yesterday and today i realized 205.334.56.88 is not redirecting to mydomain.com despite having the above 2 lines in my htaccess file. I don't know what I'm doing wrong. Please help me.
    Last edited by Elijah; 04-28-2011 at 11:46 AM.

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,122
    cPanel/WHM Access Level

    Root Administrator

    Lightbulb Re: please help me with redirection

    I was having problems with googlebot because googlebot indexed both 205.334.56.87 and mydomain.com versions of the contents of my website and google reported those as duplicate contents.
    Google itself is viewable by IP only. /http://74.125.95.147/intl/en/about.html

    Try adding one more line above those two lines:

    RewriteEngine on

    Guessing this is all thats missing.


    Code:
    
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^cozay.com\.net [OR]
    RewriteCond %{HTTP_HOST} ^205\.334\.56\.88
    RewriteRule (.*) http://www.cozay.com/$1 [R=301,L]

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Default Re: please help me with redirection

    Please thanks very much but it doesn't work. I think there is a problem with some of the WHM settings but I don't know where to fix that. for example yesterday I tried to gzip compress the contents on my site in order to save bandwith and also increase the site load speed using htacess. I tried almost every mod_flate code online but couldn't get it working using .htacess. I had to upgrade apache and then use WHM to globally compress all contents on my site. I couldn't use .htacess to compress but I was able to do that using WHM. Here is an example of what I'm talking about. this IP (69.4.235.45 )address is the main IP address for midphase.com. If you type http://69.4.235.45 in the address bar of your browser and hit enter, it redirects you to http://midphase.com not http://69.4.235.45 which helps prevent duplicate contents.

Similar Threads

  1. redirection
    By lisa.ann in forum New User Questions
    Replies: 1
    Last Post: 06-09-2010, 04:46 PM
  2. Help with redirection
    By crham225 in forum New User Questions
    Replies: 3
    Last Post: 09-28-2007, 02:19 PM
  3. Replies: 0
    Last Post: 11-03-2006, 05:02 AM
  4. Redirection help??
    By bjdea1 in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 11-29-2004, 11:55 AM
  5. redirection
    By albertldee in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 06-21-2003, 04:32 PM