TapeGun007 Posted August 18, 2016 Share Posted August 18, 2016 Simple question, how do they get the website to show like this: www.website.com/index.php/contact-us The site displays the contact-us page just fine. Shouldn't there be a "contact-us.php" file or something? I wasn't sure how to Google this because I don't know what it's called. But if you could just give me the keywords to search on, I'll be more than happy to do my own homework and read up on it. Quote Link to comment https://forums.phpfreaks.com/topic/301936-simple-question-regarding-url/ Share on other sites More sharing options...
Jacques1 Posted August 18, 2016 Share Posted August 18, 2016 You can make the webserver accept additional information after a physical path. It's basically a poor man's pretty URL. Quote Link to comment https://forums.phpfreaks.com/topic/301936-simple-question-regarding-url/#findComment-1536318 Share on other sites More sharing options...
TapeGun007 Posted August 18, 2016 Author Share Posted August 18, 2016 Hrmm... ok. This developer of ours... I just wish I could convince the owner to fire them, I think he's getting there. So... help me understand. I physically typed in domain.com/index.php just to see where it would go when I clicked on a link. When I saw the "index.php/contact-us" I flipped. So is the "contact-us" portion of that URL a directory with a file in it? I'm logged in via FTP, and I cannot find a folder or file called "contact-us" anyway is why I'm asking. Quote Link to comment https://forums.phpfreaks.com/topic/301936-simple-question-regarding-url/#findComment-1536319 Share on other sites More sharing options...
Jacques1 Posted August 18, 2016 Share Posted August 18, 2016 The “about-us” is just additional information which gets sent to the index.php script. What the script does with this information and where the page content comes from is completely up to the developer. Only the code will tell. Quote Link to comment https://forums.phpfreaks.com/topic/301936-simple-question-regarding-url/#findComment-1536320 Share on other sites More sharing options...
TapeGun007 Posted August 23, 2016 Author Share Posted August 23, 2016 I looked into the index.php file and still could not figure it out. Turns out they were using Laravel. I barely know anything other than it's a template driven way of coding php faster. Are you familiar with Laravel and/or have an opinion on it? Quote Link to comment https://forums.phpfreaks.com/topic/301936-simple-question-regarding-url/#findComment-1536467 Share on other sites More sharing options...
Jacques1 Posted August 23, 2016 Share Posted August 23, 2016 Laravel is a very popular PHP framework, so there's nothing wrong with it. The flipside is that it's much more abstract than a classical PHP application consisting of a few scripts. There is no contact-us.php file. Depending on what exactly you want to do, you'll have to look at different layers of the application. In short: The URL is resolved by the router which then passes the request to a controller class for processing. When this is done, the actual page content is rendered using views (HTML templates). See the Application Structure for an overview of the directories. So what do you want to do? Change a few bits of HTML? Implement a new feature? Quote Link to comment https://forums.phpfreaks.com/topic/301936-simple-question-regarding-url/#findComment-1536471 Share on other sites More sharing options...
TapeGun007 Posted August 23, 2016 Author Share Posted August 23, 2016 (edited) Yes Sir. I just wanted to implement our users being able to send a URL like mywebsite.com?id=12345 so that each time a business signs up using their referral code it automatically fills that id # on the form for them and makes that field uneditable. Pretty basic php, but looking at Laravel has me a bit confused since I don't fully understand how it's setup. It appears initially anyway, that a simple page has many files (or I guess they call them blades) to compile it (assuming I'm understanding this from the little bit that I have read). I'll take a look at the link you provided and maybe see if I can find a YouTube video which explains it more. Edited August 23, 2016 by TapeGun007 Quote Link to comment https://forums.phpfreaks.com/topic/301936-simple-question-regarding-url/#findComment-1536501 Share on other sites More sharing options...
TapeGun007 Posted August 23, 2016 Author Share Posted August 23, 2016 Thank you for the link btw, that explains a LOT more. I was so confused by the "app" directory because they have coded a iOS and Android application for us as well. I couldn't not, for the life of me, understand why they had our website in that "app" folder. Quote Link to comment https://forums.phpfreaks.com/topic/301936-simple-question-regarding-url/#findComment-1536502 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.