虚拟主机域名注册-常见问题 → 虚拟主机问题 → 虚拟主机问题 | |||||||||
[转帖]织梦dedecms程序安全设置
1.升级到dedecms最新版本 (dedecms后台一般支持在线升级,如果不行,请到官方网站查询手工升级办法<a href="http://www.dedecms.com/" target="_blank" border="0" src="image/url.gif" align="absmiddle" www.dedecms.com) 5、利用伪静态取消目录执行脚本 linux系统: 新建一个txt文本文件,用文本编辑器打开,复制以下规则保存,上传到网站根目录,将文件重新命名.htaccess(注意有点) 主要有data、templets、uploads、install、images、plus这些目录 windows系统: 新建一个txt文本文件,用文本编辑器打开,复制以下规则保存,上传到网站根目录,将文件重新命名web.config。 如果网站目录原本有web.config文件,仅复制以下红色部分,添加到<rules>这行后面 <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Block a" stopProcessing="true"> <match url="^a/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="a" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block data" stopProcessing="true"> <match url="^data/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="data" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block skin" stopProcessing="true"> <match url="^skin/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="skin" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block style" stopProcessing="true"> <match url="^style/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="style" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block css" stopProcessing="true"> <match url="^css/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="css" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block js" stopProcessing="true"> <match url="^js/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="js" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block images" stopProcessing="true"> <match url="^images/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="images" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block templets" stopProcessing="true"> <match url="^templets/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="templets" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block uploads" stopProcessing="true"> <match url="^uploads/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="uploads" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
|
|||||||||
>> 相关文章 | |||||||||