Redirect URL

Please post here if you have problems in using Wing FTP Server.
Post Reply
rtankersley
Posts: 2
Joined: Wed Jun 26, 2019 10:14 pm

Redirect URL

Post by rtankersley »

Is it possible to redirect the login page if a user attempts to connect via local server name?

Example:
https://ServerName" rel="nofollow redirect to https://ServerName.domain.com" rel="nofollow

Occasionally, my users are logging in using the short URL. When they create a WebLink outside users are not able to use the link, due to the incorrect path. (WebLink is generated using the short URL, without the domain name.)
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Redirect URL

Post by FTP »

OK, maybe you can add the following Javascript code into the head of the file "webclient/login.html":

<script>
if(location.href.indexOf("https://YourDomain.com") != -1)
{
location = "https://xxx.YourDomain.com";
}
</script>
rtankersley
Posts: 2
Joined: Wed Jun 26, 2019 10:14 pm

Re: Redirect URL

Post by rtankersley »

Thank you for the reply.

When I change out the URL to our domain, the code causes a loop.
Any other ideas? I think you are on the right track.

Thank you for your help!
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Redirect URL

Post by FTP »

Did you use the similar domain name like "https://xxx.YourDomain.com"?

If you use the domain name like "https://YourDomain.com/xxx", then it may cause a loop.
Post Reply