Link to home
Start Free TrialLog in
Avatar of simoa
simoa

asked on

Breaking line in .htaccess

Hello,

how can I break the link with this code? I tried to include \n but it doesn't work. The code will write to .htaccess file.

<?
$ip = "deny from $REMOTE_ADDR\n" ;
$banip = '.htaccess';
$fp = fopen($banip, "a");
$write = fputs($fp, $ip);
fclose($fp)
?>

.htaccess file output, it cannot break the line in between "deny from 123.122.8.10"

<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 123.122.8.10deny from 456.122.8.10deny from 696.122.8.10

thank you
Avatar of hernst42
hernst42
Flag of Germany image

use
$ip = "\ndeny from $REMOTE_ADDR";
in this case
ASKER CERTIFIED SOLUTION
Avatar of TeRReF
TeRReF
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of simoa
simoa

ASKER

hernst42: sorry your couldn't work thanks for helping.

TeRReF: thanks it works.
You're welcome.