I have a site which uses relative urls throughout. I am now trying to implement https for just a few pages, and it is turning into a right mess.
I tried putting the full path (https://... etc) in the links to the few pages that need it, and then realized, once you have visited these pages, of course the other pages keep that same url root.
So, i thought, i will just set a variable to the correct url root at the top of each page and include that in my links. Problem with that is i use loads of functions that also need to know about it - i really don't want to have to pass it to every one.
What i want is a superglobal - but apparently there is no such thing as a user-defined one (?) - or a constant which i can change on each page - which apparently you can't do (?).
The only way i can think of doing it is to use a SESSION var, which is a whole pile of extra coding. I'm sure there must be a better way.
As well as the http/https choice, i also want to be able to set the url to my localhost, for development.
Any advice gratefully received......







Bookmarks