小編給大家分享個(gè)織夢(mèng)安全的偽靜態(tài)策略,網(wǎng)上很多文字是說要?jiǎng)h除plus下用不到的文件如果都用的到為了防止被別人惡意攻擊導(dǎo)入木馬寫個(gè)文章
規(guī)則如下(如需其他規(guī)則可自行替換)
#禁止非法plus目錄訪問,防止攻擊
RewriteCond $1 !^(search|list|view)
RewriteRule ^plus\/(\w+)\.php(.*)$ /404.html
#禁止直接訪問模版
RewriteRule ^templets/(.*)/(.*).htm$ /404.html
RewriteRule ^data\/(.*)\.php(.*)$ /404.html