Skip to content

Instantly share code, notes, and snippets.

@martiuh
Last active April 2, 2020 06:38
Show Gist options
  • Save martiuh/6e36ab2a38ac2ed81a16ca6904f2ce1d to your computer and use it in GitHub Desktop.
Save martiuh/6e36ab2a38ac2ed81a16ca6904f2ce1d to your computer and use it in GitHub Desktop.
shared-hosting-node-htaccess
DirectoryIndex disabled
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteEngine On
RewriteRule ^$ http://127.0.0.1:3001/ [P,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1:3001/$1 [P,L]
@tofiqquadri
Copy link

Thanks a lot, it saved a lot of my time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment