<input type="submit" name="name1">
if (isset($_POST['name1'])) { ... }
Уровень знания php не нулевое
желательно русскоязычный
RewriteCond %{HTTP:X-Forwarded-Proto} !^https$ [NC]
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]