RewriteCond Host: IP to URL

Discussion in 'Apache' started by grutland, May 19, 2009.

  1. #1
    Can any one see why this wouldn't?

    
    RewriteCond Host: ^(0-9){2,3}\.(0-9){2,3}\.(0-9){2,3}\.(0-9){2,3} [OR]
    RewriteCond Host: ^lynxdevelopment\.co\.uk [NC]
    RewriteRule (.*) http\://www\.lynxdevelopment\.co\.uk$1 [I,RP]
    
    Code (markup):
    If I take the first line (IP Address) it works fine but I need to forward any one looking at my site from the IP to the URL instead.
    Problem is, it's a Dynamic IP otherwise I would hard code the IP in.
     
    grutland, May 19, 2009 IP