表单提交后htaccess没有重定向

时间:2016-10-26 08:17:29

标签: php .htaccess

RewriteCond %{QUERY_STRING} \[location\]\[value\]=(.*?)& [NC]
RewriteRule ^.*$ /version5/category/%1? [NC,L,R=301]

我正在使用GET方法从表单中发出GET表单请求,这个REGexp仅在从具有匹配GET参数的浏览器执行时才起作用,但如果我从表单GET请求执行相同操作,则它不会工作,有人可以告诉我为什么会这样吗?

形式:

<form method="GET" id="quick_search_form" action="http://localhost/version5/jobs/">
        <div class="location">
            <input value="" class="form-control input-sm" name="keywords[all_words]" id="keywords" placeholder="Keywords" type="text">
        </div>
                    <div class="location">
                <input name="GooglePlace[location][value]" id="GooglePlace" class="form-control form-control__google-location input-sm" value="" placeholder="Location" autocomplete="off" type="text">
<input name="GooglePlace[location][radius]" value="50" id="radius" class="hidden-radius" type="hidden">

            </div>
                <input name="action" value="search" type="hidden">
                    <input name="listing_type[equal]" value="Job" type="hidden">
                <div class="search-right" "="">
            <input value="Search" type="submit">
        </div>
    </form>

0 个答案:

没有答案