The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
External links are made to look like part of my site
Hi all,
I am having a rather strange issue with external links posted in my threads. I will kindly ask if anyone had the same issue with external links ? Here's my problem. When a forum user posts a link with no http:// and with no www (e.g. just vbulletin.org ), then this link will become like a part of my site in the shape of http://www.mysite.com/forum/vbulletin.org which is obviously reported as a 404. Here's an example link to see it in actionhttp://www.insurance-forums.net/forum/insurance-websites/has-anyone-built-facebook-page-their-business-t31088.html#post388403 See the facebook and the other URL how they're linked There are no problems when links are, for example posted as www.vbulletin.org or http://www.vbulletin.org or any other shape, it's just that when there's no prefix (http and www) the links are rewritten wrongly as above. I have vBSEO so I completely disabled it, I disabled hooks, renamed htaccess and this behaviour keeps happening. I hope someone can help me on this strange issue if ever encountered something similar. Thanks. Val. |
#2
|
||||
|
||||
Did you try posting a link after disabling all your mods or just look to see if the links had "changed" back to normal? It looks like the links were added that way to the post, so disabling mods is not going to change the existing ones at all.
|
#3
|
|||
|
|||
I find that if you post facebook.com/something or facebook.com/something you get a link that goes to facebook.com, but if you press the link button and paste facebook.com/something into the popup, you get a link to your own site. I'm not sure why that is, but I think when you use the button it inserts an html link (rather than a url bbcode), so probably whatever turns that back in to bbcode is seeing it as a relative link.
|
#4
|
||||
|
||||
i'd say this s probably user error... the "http://" is pre-filled in the link box for a reason, it probably needs to be used.
|
#5
|
||||
|
||||
As kh99 said, it is only happening on cases when users enter simple URLs (with no http:// and no www.) into the hyperlink popup.
Just as in below screenshot http://www.insurance-forums.net/vbseo.png Any ideas ?? |
#6
|
|||
|
|||
In include/functions_wysiwyg.php, in function parse_wysiwyg_anchor() around line 435 is this code:
Code:
if (!preg_match('#^[a-z0-9]+:#i', $href)) { // relative URL, prefix it with the URL to this board $href = create_full_url($href); } if you comment that part out, it will work more like you are expecting. But I'm not sure what else it might affect, and like Lynne pointed out it won't fix existing links. ETA: Or instead of commenting it out you mgiht be able to do something more sophisticated like check if anything before the first '/' looks like a domain name. ...but BOP was also right, if you include the http:// in the popup it will work, but the problem (at least on IE) is that the http:// seems to come up selected so when you start typing it goes away. |
#7
|
||||
|
||||
What's even more strange is that following steps as in the screenshot, returns the
correct URL in Google Chrome, but fails to do so in Firefox 4 and IE8 Let's test vb.org here through all three browsers: FF 4 vbulletin.org Chrome: vbulletin.org IE8: vbulletin.org As you see only Chrome returns the correct URL. |
#8
|
||||
|
||||
I believe this has to do with browsers recognizing or not the "base" URL tag in the header.
In your HTML source do you have this line of code? Code:
<base href="YOUR FORUM URL" /> |
#9
|
||||
|
||||
No, I don't have base href code.
I added it to headinclude template and I also enabled the RewriteBase on my .htaccess and its still the same. Does leaving below in my vB 3.x do any harm ? Code:
<base href="http://www.insurance-forums.net/forum/" /><!--[if IE]></base><![endif]--> |
#10
|
||||
|
||||
I don't think it will do any harm, I just know it's not part of vBulletin by default. If all your forum files are in the same directory (/forums/) you should be OK.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|