我有下一个表格:
<form action="/" method="get" name="main">
<select size="1" name="type" id="sel" class="dropdown">
<option value="Class1" >YES</option>
<option value="Class2" >NO</option>
</select>
<input type="text" name="text"/>
<button id="go" type="submit"/>Get the Results!</button>
</form>
在 .htaccess
RewriteEngine on
RewriteBase /
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([A-Za-z0-9^/]+)/([A-Za-z0-9_^/]+)/$ /index.php?type=$1&text=$2 [QSA,L]
RewriteRule ^([A-Za-z0-9^/]+)/([A-Za-z0-9_^/]+)/?$ /index.php?type=$1&text=$2 [QSA,L]
问题是:我如何将用户发送到http://site.com/class1/text/以便.htaccess代码工作?
现在将它们发送到/?type=class1&text=sometext