Welcome Guest, Not a member yet? Register   Sign In
I don't understand base URL
#1

[eluser]veggen[/eluser]
I am confused by the use of base URL in config.php. In all sample projects it's example.com and in video tutorials, the same URL is used and is even accessed from the browser. What I don't get is how is this achieved? I mean, won't browser just open the actual example.com unless it's remapped in the OS's hosts file? In order to access my app, I have to go to localhost/AppName/, otherwise it won't work... Am I missing something or...?

Thanks for any insight.
#2

[eluser]tonanbarbarian[/eluser]
example.com is an "example".
you are suppposed to put the correct value for your site
#3

[eluser]dudeami0[/eluser]
I am not sure, but it was probably for show. I've always developed on http://localhost/project, but I guess you could edit your host files and setup Apache to handle it. It might be achievable another way, but I don't know.
#4

[eluser]2think[/eluser]
Yes, you are correct that unless you set your own Apache vhosts or httpd.conf file properly, even if your Hosts file is setup correctly, your local Apache will not know it should be authoritative for whatever domain.

What you can do to alleviate this is do what you're doing, use localhost/<your_app_here>

That way, you change the folder name per app
#5

[eluser]veggen[/eluser]
Ok, thank you guys!
I was puzzled by the video example where this fictional URL was actually accessed from the browser. Must have been for show Smile

Thanks again!
#6

[eluser]2think[/eluser]
Real quick tip/FYI. It is extremely common in IT (programming, networking) to use the domain name example.com as a placeholder.

Go see this RFC and check out the second section (the number 2, right near the top) http://tools.ietf.org/html/rfc2606




Theme © iAndrew 2016 - Forum software by © MyBB