1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need .htaccess help forward IP to Domain Name

Discussion in 'Apache' started by Dekker, Nov 18, 2005.

  1. #1
    Some users are still using the IP address for my site.

    the current .htaccess

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName www.gossiprocks.com
    AuthUserFile /home/gossip/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/gossip/public_html/_vti_pvt/service.grp



    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://69.57.167.60/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://69.57.167.60$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://likewhatever.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://likewhatever.gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://wwww.likewhatever.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://wwww.likewhatever.gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://awfulplasticsurgery.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://awfulplasticsurgery.gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://blog.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://blog.gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://forum.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://forum.gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.awfulplasticsurgery.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.awfulplasticsurgery.gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.blog.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.blog.gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.forum.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.forum.gossiprocks.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.gossiprocks.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.gossiprocks.com$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

    RewriteCond %{HTTP_HOST} !^www\..*
    RewriteCond %{HTTP_HOST} !^$
    RewriteCond %{HTTP_HOST} ^([^.]*)\.(com|co\.uk)
    RewriteRule ^.*$ http://www.%1.%2%{REQUEST_URI} [R=permanent,L]

    I want the IP 69.57.167.60 forwarded to www.gossiprocks.com how would I do that?
     
    Dekker, Nov 18, 2005 IP
  2. Dekker

    Dekker Peon

    Messages:
    4,185
    Likes Received:
    287
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I tried adding this

    RewriteCond %{HTTP_HOST} !^69.57.167.60:)80)?$
    RewriteCond %{HTTP_HOST} !^www.gossiprocks.com.com:)80)?$
    RewriteRule ^/(.*) http://www.gossiprocks.com.com/$1 [L,R=301]

    but it didn't work either
     
    Dekker, Nov 18, 2005 IP
  3. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #3
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^([^.]+)$ http://www.gossiprocks.com/$1 [R=301,L]
     
    Nintendo, Nov 18, 2005 IP
    Dekker likes this.
  4. Dekker

    Dekker Peon

    Messages:
    4,185
    Likes Received:
    287
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks bud!
     
    Dekker, Nov 18, 2005 IP