PDA

View Full Version : href redirection


Murty
04-29-2007, 03:59 AM
Hey guys,
I'm fairly noob when it comes to programming, so im not 100% sure on how to word this, but ill give it a whirl.

I want to use my forum header and footer in a different URL extension (eg forum installed at 'http://forums.mysite.com/' and i want to use the header and footer template from there, for this link 'http://forums.mysite.com/ext/').

But I tried just copying and pasting the code, but obviously it comes up with broken images and it cant find the phrases (it is trying to get images and phrases from 'http://forums.mysite.com/ext/' rather than 'http://forums.mysite.com/'). So i was wandering if there is some way i can redirect the href that its looking for or something like that? so its looking in 'http://forums.mysite.com/' rather than 'http://forums.mysite.com/ext/'

Any help is awesome, thanks :)

ElfMage
04-29-2007, 04:05 AM
Depending on how your pages are structured you could try adding the following to the head section in your pages.


<base href="http://forums.mysite.com" />


This will tell the browser to fetch all relative content from that URL.

An alternative is to edit your forums style and change all relative paths to absolute paths.

Murty
04-29-2007, 04:30 AM
Thanks for getting back to me.
That is sort of what i was looking for, but i tried it and it doesnt work :(
I think the problem is the phrases. So is there someway i can get it to look for phrases in the right place?

Bump?

ElfMage
04-29-2007, 12:26 PM
Phrases are retrieved from the DB. The forum location shouldn't matter.

Murty
04-29-2007, 09:12 PM
Yeah, thats what i thought as well. Oh well ill try fiddle around with it. Thanks for your help anyways.

ElfMage
04-29-2007, 09:18 PM
PM me a link to your forum, and I'll take a quick look.

I see what you mean. The issue is that you cannot use vBulletin variables and phrases in an HTML page. I think there is a mod here at vb.org that allows you to do that.

Murty
05-02-2007, 08:14 PM
Cool, any chance of pushing me in the right direction?

ElfMage
05-03-2007, 03:08 AM
I haven't looked at this in a while.

Try these mods: https://vborg.vbsupport.ru/showthread.php?t=103076

And: https://vborg.vbsupport.ru/showthread.php?t=100992