This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

two different URL prefixes on the same forum

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently jforum has s single URL prefix for all links. Like
http://www.jforum.net/jforum.page?.....
I think it may be a good idea to have two different prefixes.
For example:
regular prefix is http://www.jforum.net/
when user goes to login page the prefix becomes second one:
https://www.jforum.net/ (if your browser does not support SSL - you can not login)
Then each time forum sees second prefix (starts with https)
- it uses this second prefix.

This is the feature I really missed:
I want the forum to be "http" for non-logged in users and
to be "https" for registered users.

[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This can't be simple achivied by just changing the url for the login page? I mean, the Login form / link will point to https, and then he user will remain in the https environment without any other code change, since redirects are relative (eg, there is no "http" hardcoded in the urls).

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rafael Steil wrote:This can't be simple achivied by just changing the url for the login page? I mean, the Login form / link will point to https, and then he user will remain in the https environment without any other code change, since redirects are relative (eg, there is no "http" hardcoded in the urls).

Rafael



Yes it would work, but to some extend. For consistency it probably should also be done
in templates for e-mail URL, forum.link, homepage.link, etc.
So all these parameters should be set twice and used one or another way
depending on situation.

May be it would be better to create a class of system parameters
where values can be read using methods
(and this class can be overloadeded, so the method would return one or another parameter)
rather than using static methods as
SystemGlobals.getValue(ConfigKeys.FORUM_LINK)

I think a better way for each http request create an instance
of class GLOBAL_CONFIG=new GlobalConfig(request, whatever, else);
and then GLOBAL_CONFIG.getForumLInk();

method GlobalConfig can be extended, if necessary to have dynamich set of parameters.

[originally posted on jforum.net by Anonymous]
 
I knew that guy would be trouble! Thanks tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic