欢迎各位兄弟 发布技术文章
这里的技术是共享的
AddDefaultCharset GBK
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^4000512126.com$ [NC]
RewriteRule ^(.*)$ http://www.4000512126.com/$1 [R=301,L]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteRule ^(.*)$ http://3g.4000512126.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
#这个是安全 静止php
RewriteEngine on RewriteCond % !^$
RewriteRule uploads/(.*).(php)$ – [F]
RewriteRule data/(.*).(php)$ – [F]
RewriteRule templets/(.*).(php)$ – [F]
</IfModule>
下面是ok的ask目录下的伪静态
RewriteEngine On
RewriteRule ^index.html$ index.php
RewriteRule ^([0-9]+).html$ ?ct=question&askaid=$1
RewriteRule ^([0-9]+)$ ?ct=browser&tid=$1
RewriteRule ^t([0-9]+)$ ?ct=browser&tid2=$1
#这个是提问伪静态
RewriteRule ^ask.html$ ?ct=question&ac=ask_complete
#这个是提问伪静态
RewriteRule ^ask([0-9]+).html$ ?ct=question&ac=ask_complete&tid=$1
#这个是保存伪静态
RewriteRule ^ask-save.html$ ?ct=question&ac=ask_save
#这个是安全 静止php
RewriteCond % !^$
RewriteRule templates/(.*).(php)$ – [F]