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

Home » FUDforum » How To » Dynamic WWW_ROOT
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Dynamic WWW_ROOT [message #32192] Tue, 13 June 2006 22:21 Go to next message
blemish is currently offline  blemish   France
Messages: 13
Registered: October 2005
Location: France
Karma: 0
Junior Member

Hello boys,

My board is accessible either with HTTP or HTTPS.
The base href in fud templates always refer to HTTP.

What I would like : if I come with HTTPS, the base href should refer to HTTPS

Something like
$WWW_ROOT = "http".(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on' ? 's':'')."://www.mysite.com/forums/";
in GLOBALS.php don't work, since (I think) it is used at compile time ... ?

Then, do I need to modify
$cmpl['FULL_ROOT'] = ...
in compile.inc ? I mean, is it the only way to do it ?

Thank you very much.

[Updated on: Tue, 13 June 2006 22:23]

Report message to a moderator

Re: Dynamic WWW_ROOT [message #32204 is a reply to message #32192] Wed, 14 June 2006 13:13 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
If you are using FUDforum 2.7.5, the WWW_ROOT is not compiled in, so your trick will work.

FUDforum Core Developer
Re : Dynamic WWW_ROOT [message #32212 is a reply to message #32192] Wed, 14 June 2006 19:15 Go to previous messageGo to next message
blemish is currently offline  blemish   France
Messages: 13
Registered: October 2005
Location: France
Karma: 0
Junior Member

I'm afraid I'm still in 2.7.3 Sad (I made some mods I did not remember, so updating is frightening me for now ...)
So, I have to:
- remove base href in template
- mod compile.inc
What's the cleaner solution for you ?
Thanks again.
Re: Re : Dynamic WWW_ROOT [message #32258 is a reply to message #32212] Sun, 18 June 2006 14:40 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
Mod compiler.inc is probably cleaner.

FUDforum Core Developer
Re : Dynamic WWW_ROOT [message #32271 is a reply to message #32192] Sun, 18 June 2006 19:45 Go to previous message
blemish is currently offline  blemish   France
Messages: 13
Registered: October 2005
Location: France
Karma: 0
Junior Member

Ok, thank you ! Smile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Flood Control
Next Topic: Body Mangling Regex
Goto Forum:
  

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

Current Time: Thu Nov 28 01:06:46 GMT 2024

Total time taken to generate the page: 0.03069 seconds