How do I redirect /search/ to ?s=

In your .htaccess add the following rule in between the <IfModule mod_rewrite.c> tag:

RewriteCond %{QUERY_STRING} (^|&)(.*)
RewriteRule ^(.*)$ /?s=%2 [R=301,L]

Based off of the default .htaccess generated by WordPress, it should now look like the following with your custom RewriteRule:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# Custom Rules
RewriteCond %{QUERY_STRING} (^|&)(.*)
RewriteRule ^(.*)$ /?s=%2 [R=301,L]
</IfModule>

error code: 523