Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other IP redirect to domain (htaccess)

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #153313
    chrisburton
    Participant

    How can I redirect my VPS IP to redirect to my domain?

    This is what I have from my last website

    Options +FollowSymLinks
    Options -Indexes
    RewriteEngine on 
    RewriteCond %{HTTP_HOST} ^christopherburton\.net$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.christopherburton\.net$ [OR]
    RewriteRule ^(.*)$ "http\:\/\/chrisburton\.me\/$1" [R=301,L]
    

    and this is what I tried to update it

    Options +FollowSymLinks
    Options -Indexes
    RewriteEngine on 
    RewriteCond %{HTTP_HOST} ^christopherburton\.net$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.christopherburton\.net$ [OR]
    RewriteCond %{HTTP_HOST} ^192\.184\.83\.110$
    RewriteRule ^(.*)$ "http\:\/\/chrisburton\.me\/$1" [R=301,L]
    

    However, it is not working. Any ideas?!

    #153316
    chrisburton
    Participant

    OR

    Should I change DNS settings to point my IP back to my domain?

    #153319
    __
    Participant

    I’m …a little confused.

    Are you trying to direct traffic away from your VPS? e.g., if I typed in your IP address, you want to send me to your .me domain?

    Or, are you trying to get traffic to your domains to go to your VPS? e.g., if I typed in your domain name, you want it to show the site hosted on your VPS?

    (DNS points domain names at IP addresses; not the other way around.)

    Where does this .htaccess file live? It doesn’t seem necessary to check the IP address in any case, since, if it didn’t match, you wouldn’t be encountering the .htaccess file anyway.

    #153324
    chrisburton
    Participant

    I have two domains: chrisburton.me and christopherburton.net

    christopherburton.net is my old domain and I’m pointing all my old URL’s to chrisburton.me in the htaccess file above.

    Now, chrisburton.me is showing the correct site however, when I view my site through the IP it shows the same content but I prefer it to redirect to my domain, chrisburton.me. This way I do not have duplicates.

    The .htaccess file lives on my VPS server.

    #153346
    chrisburton
    Participant

    It would help if my file was named correctly. The period makes all the difference.

    Solved.

    #153366
    __
    Participant

    It would help if my file was named correctly. The period makes all the difference.

    haha, yes, indeed.

    #153423
    chrisburton
    Participant

    I am no longer with Stablehost. I am with RamNode. However, I believe it should be in the DNS settings. What exactly are you trying to do?

    #153443
    chrisburton
    Participant

    You can always contact support.

    #153445
    Dustin
    Participant

    Are you still hosting with Stablehost? If yes, could you tell me how to locate the IP? I’ve been digging around the backend with no luck. I can only locate the nameservers.

    In cPanel, all you need to do is expand the stats on the left side. You should see the shared IP address, or if you have a dedicated one.

    I am no longer with Stablehost. I am with RamNode.

    I think I’ve heard of them but when I went to check out their plans I get this error: http://cl.ly/S1pn

    Perhaps I’ll pass on them for now!

    #153446
    chrisburton
    Participant
    #153448
    Dustin
    Participant

    I assume it must be this one.

    I was with WestHost for a while, until numerous emails that my cPanel password had be reset because they were hacked. I’m now with StableHost and haven’t had any issues. RamNode Looks good — it was just unexpected to get the down message. A while back I was with Linode, but didn’t really have time or want to manage a VPS.

    Are those prices for RamNode managed VPS servers?

    #153449
    chrisburton
    Participant

    Unfortunately, no. They are unmanaged. That’s why I initially asked for a refund. Although, after checking out the IRC channel, it’s basically better than support. Everyone is really really helpful. So, I decided to give it a try. I initially had some issues (as seen above). I went to Stack Overflow with no luck of others being able to find a solution. I then tried the dedicated Ramnode IRC chat where someone solved it for me.

    Be aware that I am not a developer so if I can do it, you certainly can. The only thing I had to do in the beginning was install PHP, MySQL and phpMyAdmin and that’s quite simple.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Other’ is closed to new topics and replies.