Answer the question
In order to leave comments, you need to log in
How to select the first element from a list?
There is a small list. How to select the first element (option) from the list in js?
<select onchange="window.location.href=this.value">
<option value="" disabled="" selected="">Выберите город</option><option value="/abhaziya">Абхазия</option>
<option value="/bagdad">Багдад</option><option value="//localhost:3000/partners/vashington">Вашингтон</option>
<option value="/omsk">Омск</option>
</select>
Answer the question
In order to leave comments, you need to log in
You need this .htaccess documentation , namely:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f # убедитесь, что это не реальный файл
RewriteRule ^([a-z]+)\.gif$ file.php?user=$1 # если совпадет регулярное выражение, перенаправляет запрос на file.php
GET is not part of the url, so it stands out separately
RewriteCond %{QUERY_STRING} (^|&)user\=(.+)($|&)
RewriteCond %{QUERY_STRING} (^|&)data\=(.+)($|&)
RewriteRule ^file\.php$ /file.php\?user\=%2\&data\=%5 [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question