I have a file (
.htaccess) which contains below excerpt.
<Files wp-login.php> order deny,allow deny from all allow from 188.8.131.52 </Files>
I need to replace
184.108.40.206 with my current IP. But
220.127.116.11 is not static. I need to find the IP expression at
allow from line and replace it with my current IP.
I also need to get my current IP (
12:13:07 up 21 days, 3:01, 1 user, load average: 0.18, 0.13, 0.12 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 18.104.22.168 14:29 0.00s 0.10s 0.00s w
How can I get current IP from
w command and replace
allow from line in