1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

htaccess seem not being taken in account on Plesk

Discussion in 'Plesk for Linux - 8.x and Older' started by CBiLL, Aug 17, 2005.

  1. CBiLL

    CBiLL Guest

    0
     
    I was trying to fiddle around htaccess on my website which runs under Plesk 7.5.2 and I am wanting to redirect a certain ips to another website so I tried the rewrite rule and all combantion of rules with no results at all.

    I was thinking that htaccess isn't working so I tried the deny from <my-ip-here> and it did not stop my ip from accessing the website at all.

    I already tried restarting apache and still does not follow any new rules I put in my htaccess.

    Any step I might be missing? I have adminstrator control to the Plesk .

    Also could anyone give me a example of rewrite rule to use in htaccess to redirect a certain ip to another url?

    Thanks
    Bill
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Replace the xx, yy, zz, nn with the IP address, leave the \. between each number. Change google.com to whatever URL you wish. Make sure you only have a single 'RewriteEngine on' directive. This is a 'simple' example for a single IP as requested.

    # Redirect a specific IP to a different URL
    RewriteEngine on
    RewriteCond %{REMOTE_ADDR} xx\.yy\.zz\.nn
    RewriteRule .* http://www.google.com [R]
     
Loading...