IIS ReWrite Incomplete URL Submit

Hi All. I’ve searched and can’t find this issue or resolution on web or manual.
Apologies if I missed it somewhere.

Install is working well on IIS 10. Properly formed long URL is correctly shortened and is converted correctly.

Issue: when a user enters an incomplete URL (e.g. www.abc.com/folder/file.html) it does not convert it to a full URL (with https:// or http://).

An old install we have (v1.4.3) on Apache does warn the user and rewrite the submitted URL to include ‘http://’

Any tips, besides running Apache, to get IIS to do this?

Expected behavior. YOURLS can shorten any kind of URI : a URL that starts with http://, or a FTP link, or a mailto: link , anything that one can follow in their browser. Not everything starts with http (relative links, for instance)

If you want to shorten only HTTP links, you could enforce this with a plugin

Thanks for the reply. the issue is not the type of URL that is being shortened, it is about the modification of the submitted URL, if it does not include link type (e.g. http://, mailto://, ftp://). The old version appended http:// on the front of a plain host name, as in my example.

Again: it’s expected behavior. YOURLS 8 years ago could only shorten “HTTP” links, now anything. www.something is a valid URI, just as www:something or http://www.something, they just refer to different things and it’s impossible for YOURLS to determine if it’s user error or not.

Thank you, again. I appreciate you.
Can you suggest a way, either via a plugin or otherwise, I could return the old behavior to the new version? I believe my user base would tolerate HTTP-only shortening.

See https://github.com/YOURLS/YOURLS/wiki/Possible-With-A-Plugin

Thanks again. I will use the Check-URL plugin to prevent malformed URL submission.
I appreciate your time on this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.