Wellwisher Dear Flarumians, I've set-up Flarum in a sub-directory i.e www.mywebsite.com/flarum I was able redirect HTTP TO HTTPS in the .htaccess file using the following code: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule .*$ https://www.yourdomain.com/flarum$1 [R,L] How do I achieve the same for NginX? I am unsure what code I would need to add in the .nginx.conf file.
SKevo Wellwisher are you perhaps looking for something like this? However, this does not take into account the fact that you are hosting Flarum in a subdirectory
Wellwisher SKevo Ok so the code for nginx is: server { listen 80; server_name yourdomain.tld; location / { return https://$host$request_uri; } } Now the question is how do I point this to my subfolder? ๐คจ i.e www.mywebsite.com/flarum
SKevo Wellwisher Now the question is how do I point this to my subfolder? I can imagine that the simplest solution would be: server { listen 80; server_name yourdomain.tld; location /flarum { return https://$host$request_uri; } }
Wellwisher Thank you, you beautiful person. Now that's what I am talking about. Heck yeah buddy. Thank you! ๐