站长商城伪静态配置说明

  • 时间:2017-08-02 11:12 编辑:站长之家 来源:站长商城 阅读:263
  • 扫一扫,手机访问
摘要:站长商城伪静态配置说明

本文适用于虚拟主机或LINUX主机的用户朋友,因为虚拟主机或LINUX的主机,不方便直接操作目录权限(即使操作了,也不完全能修复),因此我们是通过设置伪静态的方法,来实现漏洞修复,具体步骤如下:

一、伪静态规则是.htaccess的用户参照这里:

打开.htaccess,将以下代码复制在这个文件底部,保存即可。

RewriteRule upload/(.*).(PHP)$ – [L,NC] 

RewriteRule upload/(.*).(asp)$ – [L,NC] 

RewriteRule upload1/(.*).(php)$ – [L,NC] 

RewriteRule upload1/(.*).(asp)$ – [L,NC] 

RewriteRule upload2/(.*).(php)$ – [L,NC] 

RewriteRule upload2/(.*).(asp)$ – [L,NC] 

RewriteRule upload3/(.*).(php)$ – [L,NC] 

RewriteRule upload3/(.*).(asp)$ – [L,NC] 

RewriteRule ad/(.*).(PHP)$ – [L,NC] 

RewriteRule ad/(.*).(asp)$ – [L,NC] 

RewriteRule gg/(.*).(PHP)$ – [L,NC] 

RewriteRule gg/(.*).(asp)$ – [L,NC] 

RewriteRule uploadfile/(.*).(php)$ – [L,NC] 

RewriteRule uploadfile/(.*).(asp)$ – [L,NC] 

RewriteRule userphoto/(.*).(php)$ – [L,NC] 

RewriteRule userphoto/(.*).(asp)$ – [L,NC] 

RewriteRule attached/(.*).(php)$ – [L,NC] 

RewriteRule attached/(.*).(asp)$ – [L,NC]

RewriteRule img/(.*).(php)$ – [L,NC] 

RewriteRule img/(.*).(asp)$ – [L,NC]


二、伪静态规则是httpd.ini的用户参照这里:

打开httpd.ini,将以下代码复制在这个文件底部,保存即可。

RewriteRule /config/ueditor/php/upload/(.*).PHP$ /css/ [I]

RewriteRule /config/ueditor/php/upload/(.*).asp$ /css/ [I]

RewriteRule /config/ueditor/php/upload1/(.*).php$ /css/ [I]

RewriteRule /config/ueditor/php/upload1/(.*).asp$ /css/ [I]

RewriteRule /config/ueditor/php/upload2/(.*).php$ /css/ [I]

RewriteRule /config/ueditor/php/upload2/(.*).asp$ /css/ [I]

RewriteRule /config/ueditor/php/upload3/(.*).php$ /css/ [I]

RewriteRule /config/ueditor/php/upload3/(.*).asp$ /css/ [I]

RewriteRule /config/ueditor_mini/php/upload/(.*).php$ /css/ [I]

RewriteRule /config/ueditor_mini/php/upload/(.*).asp$ /css/ [I]

RewriteRule /config/ueditor_mini/php/upload1/(.*).php$ /css/ [I]

RewriteRule /config/ueditor_mini/php/upload1/(.*).asp$ /css/ [I]

RewriteRule /config/ueditor_mini/php/upload2/(.*).php$ /css/ [I]

RewriteRule /config/ueditor_mini/php/upload2/(.*).asp$ /css/ [I]

RewriteRule /config/ueditor_mini/php/upload3/(.*).php$ /css/ [I]

RewriteRule /config/ueditor_mini/php/upload3/(.*).asp$ /css/ [I]

RewriteRule /ad/(.*).php$ /css/ [I]

RewriteRule /ad/(.*).asp$ /css/ [I]

RewriteRule /gg/(.*).php$ /css/ [I]

RewriteRule /gg/(.*).asp$ /css/ [I]

RewriteRule /img/(.*).php$ /css/ [I]

RewriteRule /img/(.*).asp$ /css/ [I]

RewriteRule /userphoto/(.*).php$ /css/ [I]

RewriteRule /userphoto/(.*).asp$ /css/ [I]

RewriteRule /upload/(.*).php$ /css/ [I]

RewriteRule /upload/(.*).asp$ /css/ [I]

RewriteRule /ckeditor/attached/(.*).php$ /css/ [I]

RewriteRule /ckeditor/attached/(.*).asp$ /css/ [I]

RewriteRule /config/loveedit/uploadfile/(.*).PHP$ /css/ [I]

RewriteRule /config/loveedit/uploadfile/(.*).asp$ /css/ [I]


三、nginx伪静态的,参考如下:

将以下规则复制进伪静态文件里即可

location ~* ^/((.*)upload|ad|gg|img|ckeditor\/attached|(.*)upload1|(.*)upload2|(.*)upload3)/.*\.(php|php5|asp)$

{

deny all;

}


四、IIS7,建立一个UTF8格式的文件,命名为web.config,将以下代码复制到这个文件中

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <handlers accessPolicy="Read" />

    </system.webServer>

</configuration>

然后将这个文件web.config传到后台提示的漏洞文件夹中

如果以上的这个IIS7方法不适用, 请用以下代码


<rule name="p1">

<match url="^ad/(.*).php" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="a1">

<match url="^ad/(.*).asp" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="p0">

<match url="^gg/(.*).php" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="a0">

<match url="^gg/(.*).asp" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="p2">

<match url="(.*)upload/(.*).php" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="a2">

<match url="(.*)upload/(.*).asp" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="p3">

<match url="(.*)upload1/(.*).php" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="a3">

<match url="(.*)upload1/(.*).asp" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="p4">

<match url="(.*)upload2/(.*).php" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="a4">

<match url="(.*)upload2/(.*).asp" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="p5">

<match url="(.*)upload3/(.*).php" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="a5">

<match url="(.*)upload3/(.*).asp" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="p6">

<match url="^img/(.*).php" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="a6">

<match url="^img/(.*).asp" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="p7">

<match url="^ckeditor/attached/(.*).php" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>

<rule name="a7">

<match url="^ckeditor/attached/(.*).asp" ignoreCase="false" />

<action type="Rewrite" url="/css/" appendQueryString="false" />

</rule>


  • 全部评论(0)
资讯详情页最新发布上方横幅
最新发布的资讯信息
【计算机/互联网|】域名抵押贷款(2018-04-29 23:48)
【站长时事|】站长商城 免费虚拟主机 免费申请(2017-12-10 07:44)
【金融/投资|创业】马化腾、李开复、陈大年等大佬如何看经济寒冬?(2017-11-16 08:18)
【站长时事|网站SEO】SEO快排服务:快速上首页的背后(2017-11-16 08:14)
【站长时事|网站SEO】揭秘!如何快速提高网站权重(2017-09-23 22:22)
【金融/投资|股票】A股本月上演举牌潮 哪些上市公司最有可能被看上(2017-09-23 22:04)
【计算机/互联网|互联网】严惩网站网页标题作弊!百度9月底将推清风算法(2017-09-23 22:01)
【计算机/互联网|多媒体】黑龙江跪拜到五台山的僧人(2017-09-22 22:00)
【站长时事|建站经验】2017年最后几个月,网页设计师值得注意的趋势(2017-09-21 13:17)
【计算机/互联网|服务器应用】在WDCP面板环境安装SSL证书实现HTTPS网址(2017-09-13 21:06)