【发布时间】:2014-01-26 19:54:13
【问题描述】:
我正在努力让我的网址缩短器更容易减少垃圾邮件。当我必须通过 ssh 进入并继续在我的 .htaccess 中添加另一行时,它变得非常乏味且非常烦人。所以我想知道是否有一种方法可以轻松添加一行文本并且可以放入脚本中
例子:
<Directives here>
Order Deny,Allow
Deny from 255.255.255.255
Deny from 0.0.0.0
Deny from 1.2.3.4
<Other Directives here as well as ending Directive>
现在让我们说笑声,我想在其中添加 127.0.0.1 和 192.168.0.1,但由于我无法直接在我想要的地方回显,我将如何处理。接受 Bash 或 Python 答案
【问题讨论】:
标签: python apache bash .htaccess