FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Relative Links
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Relative Links [message #29662] Sun, 08 January 2006 12:27 Go to next message
pisi is currently offline  pisi   Germany
Messages: 7
Registered: January 2006
Karma: 0
Junior Member
I need FUD-Forum to use relative Links, because it must be reachable by multiple Host-names (internal URL, external URL, ssl, non-ssl).

The used Version is 2.7.3.

If I set
WWW ROOT = "/"
then it works perfectly in every Browser, except IE.
IE is not able to handle
<BASE HREF="/">
.
It also seems, that this is not W3C conform usage of the BASE-tag.

What is the correct way to make FUD-Forum use relative Links?

I apologize if this Question is already answered elsewhere and I did not found it, but please denote me the place where to find the answer.
Re: Relative Links [message #29675 is a reply to message #29662] Mon, 09 January 2006 14:56 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Rather then doing what you did you can make PHP retrieve the hostname and populate the WWW_ROOT with it. One suggestion would be to modify GLOBALS.php to have WWW_ROOT = "http://" . $_SERVER['HTTP_HOST']."/";

FUDforum Core Developer
Re: Relative Links [message #29677 is a reply to message #29675] Mon, 09 January 2006 15:03 Go to previous messageGo to next message
pisi is currently offline  pisi   Germany
Messages: 7
Registered: January 2006
Karma: 0
Junior Member
There is an apache with mod_rewrite in front of it. So this may not work. I could hack it and detect the connection from the rewrite-host and set the ROOT manually.

But isn't the URL also at 300+ places in the template-files?
Re: Relative Links [message #29679 is a reply to message #29677] Mon, 09 January 2006 15:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, the only place where the full url is used is for HTTP redirects. You can do a slight modification to the compiler.inc and make it replace the {FULL_ROOT} with '.$GLOBALS['WWW_ROOT'].' rather then its value.

FUDforum Core Developer
Re: Relative Links [message #29707 is a reply to message #29679] Tue, 10 January 2006 11:45 Go to previous messageGo to next message
pisi is currently offline  pisi   Germany
Messages: 7
Registered: January 2006
Karma: 0
Junior Member
Thanks for your proposal.

One thing I still do not understand:
What ist "<BASE HREF="/">" used for?
It works without it.
(What problems may be introduced by omitting it?)
Re: Relative Links [message #29711 is a reply to message #29707] Tue, 10 January 2006 15:23 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Base href normally contains the entire WWW_ROOT which is http://...
it is used to have the browser automatically prefix all links with the forum's location. This allows links to be much shorter, especially when the forum is installed in a separate directory.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: does it support php5 and postgresql8
Next Topic: WAP web forums and commercial developers
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat May 18 14:30:15 GMT 2024

Total time taken to generate the page: 0.02407 seconds