[RFC|Rejected] <base>

These RFCs were either rejected or have been replaced by an alternative proposal. They will not be included in phpBB.
User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

[RFC|Rejected] <base>

Post by Arty » Sat Nov 03, 2012 3:47 pm

I suggest to add <base> tag to <head> section of *_header.html templates, pointing to phpBB root directory, like this:

Code: Select all

<base href="{ROOT_PATH}" />
It will change all relative URLs to be relative to phpBB root directory instead of current location.

All URLs will become relative to phpBB root directory, so there would be no need to add $phpbb_root_path to every single URL, it will be easier to override URLs in stuff like SEO extensions. It also means fewer "global $phpbb_root_path;" declarations in phpBB classes, making code a bit cleaner.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] <base>

Post by brunoais » Sat Nov 03, 2012 5:14 pm

Sounds like a good idea. Form the looks of it I vote +1.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] <base>

Post by nickvergessen » Sat Nov 03, 2012 5:28 pm

please not? if you add this, all current relative urls will be broken?
Member of the Development-TeamNo Support via PM

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] <base>

Post by Arty » Sat Nov 03, 2012 5:32 pm

nickvergessen wrote:please not? if you add this, all current relative urls will be broken?
No, URLs will work like they used to, the only difference is $phpbb_root_path will be missing from URLs in HTML code. For example ./viewtopic.php?t=1 will become viewtopic.php?t=1 and browsers will link those URLs to same locations as before.

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] <base>

Post by MichaelC » Sat Nov 03, 2012 11:34 pm

+1
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.


User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 148
Joined: Thu Sep 09, 2010 11:36 am
Location: Munich, Germany

Re: [RFC] <base>

Post by Marc » Sun Nov 04, 2012 9:22 pm

How would this impact on the use of append_sid() (not sure if it's still that in 3.1)?

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] <base>

Post by Arty » Sun Nov 04, 2012 9:49 pm

Marc wrote:How would this impact on the use of append_sid() (not sure if it's still that in 3.1)?
$phpbb_root_path will be removed from it, so append_sid("{$phpbb_root_path}index.$phpEx") turns into append_sid("index.$phpEx")

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] <base>

Post by EXreaction » Mon Nov 05, 2012 12:13 am

Will it cause problems if append_sid calls are not changed?

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] <base>

Post by Arty » Mon Nov 05, 2012 12:52 am

EXreaction wrote:Will it cause problems if append_sid calls are not changed?
It will for calls where $phpbb_root_path is not ./
phpbb_root_path should be removed from all append_sid() calls

Post Reply