【发布时间】:2015-10-30 04:39:56
【问题描述】:
请求:
"GET /api/get_recent_posts/?dev=1&page=1 HTTP/1.1" 200 40831 "-" "Mozilla/5.0 (Linux; U; Android 0.5; en-us) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3"
尝试使用以下命令阻止请求但不起作用
RewriteEngine On
RewriteCond %{REQUEST_METHOD} GET
RewriteRule ^api/get_recent_posts/(.*)$ - [F,NC]
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/api/get_recent_posts/(.*)$
RewriteRule ^(.*)$ - [F,L]
【问题讨论】:
-
已经看到了,无法用它来解决这个问题。
-
我从该链接第二次尝试更新,但是不行,我认为问题在于 URL 的结尾:
code?dev=1&page=1code -
你能确定 mod-rewrite 已经加载了吗?
标签: apache .htaccess mod-rewrite