-
I'm sorry if this has been covered- I've been through all the documentation and searched for a relevant discussions but didn't see something related to this issue. Unfortunately, I'm not sure what to use for the search, and most of the words are very common (redirect, url, domain, etc). I've installed Yourls on a subdomain (x.organicscience.jp), and everything appears to be functioning correctly. I was able to get through the install process and the interface is working properly. The three default shortened URLs- ozh, yourls, yourlsblog- all work as intended. However, when I try to add a new entry, everything looks correct in the UI, but the URL redirects the browser to x.organicscience.jp. Using the URL will only return me to that URL. I am unable to load the site I am shortening. I have checked the .htaccess file, and it appears to be correct. Also, the config.php seems to be set up correctly. I am using Dreamhost and have installed Yourls on a different hosted domain, and it worked without issue. I thought it may be due to a lack of index file, but upon adding a blank index file, it still functioned in the same way. An example: https://x.organicscience.jp/fb - Should redirect to facebook.com |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I had a theory that caching was involved, but since you provided test links and the exact same behavior happened to me… Nope, that theory was immediately proved wrong. But testing led me to what is happening. The default links have a scheme: For example, Your test Here is a verbose cURL log, with the irrelevant bits (TLS negotiation, raw IPs, etc.) stripped out, showing what is happening:
|
Beta Was this translation helpful? Give feedback.
I had a theory that caching was involved, but since you provided test links and the exact same behavior happened to me… Nope, that theory was immediately proved wrong. But testing led me to what is happening.
The default links have a scheme: For example,
ozh
points tohttps://ozh.org/
.Your test
fb
keyword points tofacebook.com
. It has no scheme. When YOURLS sends this in aLocation
header, this value is treated as a relative URL—the browser tries to loadhttps://x.organicscience.jp/facebook.com
, and is then redirected to/
(the root) by YOURLS' default keyword-not-found behavior.Here is a verbose cURL log, with the irrelevant bits (TLS negotiation, raw IPs, etc.) stripped out, showing …