Results 1 to 5 of 5
  1. #1
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    551
    .htaccess question
    I have a site that I ban all IP's apart from my own.

    The problem is that I am getting typins and I want to 301 the traffic to another site.

    I have:

    order deny,allow
    deny from all
    allow from <MYIP>

    Does anyone know how to redirect all instead on denying all.

    Ta...

  2. #2
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    551
    Dont ya just feel like a right idiot when 20 minutes after you post the question you find the answer

    RewriteCond %{REMOTE_ADDR} !^<MYIP>$
    RewriteRule ^(.*)$ http\:\/\/www\.myotherwebsite\.com\/ [L]


  3. #3
    Crazy like a fox suzigeek's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,096
    Story of my life!
    Suz~~GearGirl~~

  4. #4
    affiliate emeritus missdonna's Avatar
    Join Date
    January 18th, 2005
    Location
    Torrance, CA
    Posts
    1,986
    Yes, but you found the answer. That's good, right?
    Affiliate Marketing - The hardest easy money I ever made.

  5. #5
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    551
    As I mentioned that I wanted a 301 redirect and to tidy the loose ends up

    RewriteCond %{REMOTE_ADDR} !^myIP$
    RewriteRule ^(.*)$ http\:\/\/www\.mysite\.com\/ [R=301,L]

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. .htaccess question
    By DealSucker in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: November 7th, 2012, 03:50 PM
  2. .htaccess question
    By Convergence in forum Programming / Datafeeds / Tools
    Replies: 8
    Last Post: April 2nd, 2009, 08:53 PM
  3. 301 redirect using htaccess question
    By ~Michelle in forum Midnight Cafe'
    Replies: 5
    Last Post: February 26th, 2006, 09:16 PM
  4. mod_rewrite/.htaccess question
    By dak142 in forum Midnight Cafe'
    Replies: 6
    Last Post: July 19th, 2004, 03:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •