PDA

View Full Version : [SITE] [url] Code WITHOUT http:// at start causes 404.



Mihari
10-11-2012, 04:37 PM
If a url code is given as
www.mysite.com It causes an error as it points to: www.weasyl.com/www.mysite.com.

However, if you tack on a full url with http:// like so:

http://www.mysite.com it works.

I don't know if this working as intended, but felt there was no harm in reporting it.

GingerM
10-11-2012, 07:53 PM
If a url code is given as
www.mysite.com It causes an error as it points to: www.weasyl.com/www.mysite.com (http://www.weasyl.com/www.mysite.com).

However, if you tack on a full url with http:// like so:

http://www.mysite.com it works.

I don't know if this working as intended, but felt there was no harm in reporting it.

I'm not one of the admins nor do I play one on TV :) , but my understanding is that this is the intended functionality, so as to support relative URLs. Let's say you wanted to link to someone's submission; you could do so simply by doing /submisson/1234 (assuming that was the submission number) and then the system automagically inserts "http://www.weasyl.com" in front of it. FA has a similar system to allow relative URLs there as well. From my experimentation I've found you can do that to link to submissions, journals and characters.

If I'm wrong, I defer to the admins.

Mihari
10-12-2012, 08:02 PM
I'm not one of the admins nor do I play one on TV :) , but my understanding is that this is the intended functionality, so as to support relative URLs. Let's say you wanted to link to someone's submission; you could do so simply by doing /submisson/1234 (assuming that was the submission number) and then the system automagically inserts "http://www.weasyl.com" in front of it. FA has a similar system to allow relative URLs there as well. From my experimentation I've found you can do that to link to submissions, journals and characters.

If I'm wrong, I defer to the admins.

I did ask for the sake of wondering, but a simple regex expression coupled with an if/else statement could determine whether or not to use a relative link or not with the existence of a 'www.' or not or something similar. It's impossible to know what they want to do or not.

Kihari
10-12-2012, 11:06 PM
determine whether or not to use a relative link or not with the existence of a 'www.' or not or something similar

A good call indeed; this has been added and any broken [url]s that this would have caught should now function as intended. Thanks for reporting!