欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

两个ok的 htaccess

第一个htaccess
AddDefaultCharset GBK
ErrorDocument 404 /error/404.html
 
<IfModule mod_rewrite.c>

#跳转
RewriteEngine On
RewriteCond %{HTTP_HOST} ^cccc.com$ [NC]
RewriteRule ^(.*)$ http://www.bbbb.com/$1 [R=301,L]
 
 
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteRule ^(.*)$ http://m.bbbb.com/ [NC,R=301]
 
 
 
RewriteRule ^/ask/index.html$ /ask/index.php
RewriteRule ^/ask/([0-9]+).html$ /ask/?ct=question&askaid=$1
RewriteRule ^/ask/([0-9]+)$ /ask/?ct=browser&tid=$1
RewriteRule ^/ask/t([0-9]+)$ /ask/?ct=browser&tid2=$1
#这个是提问伪静态
RewriteRule ^/ask/ask.html$ /ask/?ct=question&ac=ask_complete
#这个是提问伪静态
RewriteRule ^/ask/ask([0-9]+).html$ /ask/?ct=question&ac=ask_complete&tid=$1
 
#这个是保存伪静态
RewriteRule ^/ask/ask-save.html$ /ask/?ct=question&ac=ask_save
 
#防止外来网来人员进行报名破坏
RewriteCond %{HTTP_REFERER} !^http://wzfzxx.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.wzfzxx.com [NC]
RewriteRule php/zaixianbaoming(.*)\.php$ /nolink.txt [R,NC]
 
 
 
#这个是安全 静止php
RewriteCond % !^$  
RewriteRule uploads/(.*).(php)$ – [F]  
RewriteRule data/(.*).(php)$ – [F]  
RewriteRule templets/(.*).(php)$ – [F]
RewriteRule plus/(?!feedback_ajax|count)[^>]*.(php)[^>]*$ – [F]
RewriteRule member/(.*).(php)$ – [F]
RewriteRule special/(.*).(php)$ – [F]
#RewriteRule include/(?!vdimgck).{7}.(php)$ – [F] 效果不理想
RewriteRule include/(?!vdimgck|dialog/select_images)[^>]*.(php)$ – [F]
RewriteRule data/(.*).(php)$ – [F]
RewriteRule a/(.*).(php)$ – [F]
RewriteRule images/(.*).(php)$ – [F]
 
</IfModule>

第二个htaccess
 
 
AddDefaultCharset GBK
ErrorDocument 404 /error.html
 
<IfModule mod_rewrite.c>
 
RewriteEngine On
#RewriteCond %{HTTP_HOST} ^bbbb.com$ [NC]
#RewriteRule ^(.*)$ http://www.bbbb.com/$1 [R=301,L]
 
#RewriteCond %{HTTP_HOST} ^ccccc.com$ [NC]
#RewriteRule ^(.*)$ http://www.ccccc.com/$1 [R=301,L]
 
 
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteRule ^(.*)$ http://wap.dddd.com/ [NC,R=301]
 
 
 
RewriteRule ^ask/index.html$ /ask/index.php
RewriteRule ^ask/([0-9]+).html$ /ask/?ct=question&askaid=$1
RewriteRule ^ask/([0-9]+)$ /ask/?ct=browser&tid=$1
RewriteRule ^ask/t([0-9]+)$ /ask/?ct=browser&tid2=$1
#这个是提问伪静态
RewriteRule ^ask/ask.html$ /ask/?ct=question&ac=ask_complete
#这个是提问伪静态
RewriteRule ^ask/ask([0-9]+).html$ /ask/?ct=question&ac=ask_complete&tid=$1
 
#这个是保存伪静态
RewriteRule ^ask/ask-save.html$ /ask/?ct=question&ac=ask_save
 
RewriteRule ^TEL:400-0512-126$ /zy/licai/#li-cai
RewriteRule ^400-0512-126$ /fzpx/#fzxxsj
 
 
#防止外来网来人员进行报名破坏
#RewriteCond %{HTTP_REFERER} !^http://my.bbbb.com [NC]
#RewriteCond %{HTTP_REFERER} !^http://bbbb.com [NC]
#RewriteCond %{HTTP_REFERER} !^http://www.bbbb.com [NC]
#RewriteCond %{HTTP_REFERER}  !bbbb.com [NC]
#RewriteCond %{HTTP_REFERER} !^http://ccccc.com [NC]
#RewriteCond %{HTTP_REFERER} !^http://www.ccccc.com [NC]
#RewriteCond %{HTTP_REFERER}  !ccccc.com [NC]
#RewriteRule php/zaixianbaoming(.*)\.php$ /nolink.txt [R,NC]
#RewriteRule php/zaixianbaoming(.*)\.php$ /nolink.txt [R,NC]
 
#这个是安全 静止php
RewriteCond % !^$  
RewriteRule uploads/(.*).(php)$ – [F]  
RewriteRule data/(.*).(php)$ – [F]  
RewriteRule dataa/(.*).(php)$ – [F]  
RewriteRule templets/(.*).(php)$ – [F]
RewriteRule plus/(?!feedback_ajax|count|list|view)[^>]*.(php)[^>]*$ – [F]
RewriteRule member/(.*).(php)$ – [F]
RewriteRule special/(.*).(php)$ – [F]
#RewriteRule include/(?!vdimgck).{7}.(php)$ – [F] 效果不理想
RewriteRule include/(?!vdimgck|dialog/select_images)[^>]*.(php)$ – [F]
RewriteRule data/(.*).(php)$ – [F]
RewriteRule a/(.*).(php)$ – [F]
RewriteRule images/(.*).(php)$ – [F]
</IfModule>
 
 
order allow,deny
deny from 220.181.51.110
deny from 111.206.36.17
deny from 220.181.51.42
deny from 123.125.67.216
deny from 111.206.36.143
deny from 111.206.36.145
deny from 111.206.36.8
deny from 111.206.36.14
deny from 220.181.51.58
deny from 123.125.67.216
deny from 61.132.207.194
deny from 61.148.18.138
 
allow from all
 

普通分类: