In this video, we demonstrate how to convert .htaccess rules to Nginx directives.
Commands used:
rewrite regex URL [flag];
RewriteCond %{HTTP_HOST} example.com
RewriteRule (.*)https://www.example.com$1
nginx -t
nginx -s reload
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
The full article for this video can be found here: https://www.liquidweb.com/kb/convert-htaccess-rules-nginx-directives/
For more information about this and other topics, visit us at https://www.liquidweb.com/kb/ or for more information on our VPS product line, visit: https://www.liquidweb.com/products/vps/.
Video by: Justin Palmer
Duration: 00:02:46
Publisher: Liquid Web
You can watch this video also at the source.