Mod_rewrite auto https and port number?

Questions about HTTP Access/Mods may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.
kush
Beginner
Beginner
Posts: 27
Joined: Mon Feb 23, 2015 4:36 pm

Mod_rewrite auto https and port number?

Postby 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]

Return to “HTTP/Apache Mods”

Who is online

Users browsing this forum: No registered users and 1 guest