Jump to content
Sign in to follow this  
TapeGun007

Simple question regarding URL

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 by TapeGun007

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.