Gazley Posted July 27, 2016 Posted July 27, 2016 Hi, Is there a $config->url type of option that will return the URL below when I am running on localhost (ie: with the specified port, too) ? http://localhost:8888/ I want to do a redirect when on the live server or localhost. Thanks!
adrian Posted July 28, 2016 Posted July 28, 2016 Is this any use to you? $_SERVER['SERVER_PORT'] It will return 8888 or 80 or whatever the port is. 2
Gazley Posted July 28, 2016 Author Posted July 28, 2016 @MuchDev There is no $config->httpUrl but I can certainly do $pages->get('/')->httpUrl and that gives me what I need. Thanks for reminding me httpUrl. I forgot all about that because I was looking at the $config options only! @adrian It certainly does give me the port. Thanks for that 1
LostKobrakai Posted July 28, 2016 Posted July 28, 2016 $input does also have a url/httpUrl option if you're using urlSegments and you want those to be included. 3
MuchDev Posted July 30, 2016 Posted July 30, 2016 On 7/28/2016 at 1:24 AM, Gazley said: @MuchDev There is no $config->httpUrl but I can certainly do $pages->get('/')->httpUrl and that gives me what I need. Thanks for reminding me httpUrl. I forgot all about that because I was looking at the $config options only! Oh yeah derp derp good deal you got settled 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now