Mod_rewrite auto https and port number?

Questions about HTTP Access/Mods may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
kush
Rookie
Rookie
Posts: 31
Joined: Mon Feb 23, 2015 4:36 pm

Mod_rewrite auto https and port number?

Unread post by kush » Tue Mar 03, 2015 3:12 pm

Hi everyone, not sure if I'm posting in the right place, or if Mod_rerwrite will do that thing I want it to do, but here it goes. Basically I set up my Synology so I can access it through a subdomain on my website. It's working, and I have the option that forces https on port 5001 on. I'd like to make it so I don't have to put in the ports at all and no matter how I input the subdomain.domain.com to automatically make sure it uses the 5001 port because otherwise the login page doesn't load. I found a quick text on my web host, but I think I'd need to edit files on the synology and have no idea where to start.

Thanks in advance.

Code that I found (I thought i can just change the 80 to 5001):

Code: Select all

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]

Post Reply

Return to “HTTP/Apache Mods”