Avatar of Bruce Gust
Bruce Gust
Flag for United States of America asked on

Why does this page get a 404?

Here's my link:

<a href="{{ url('show/practice/1') }}">Video #1</a>

Here's my route:

Route::get('/show/practice/{id}', 'PracticeController@showPractice')->name('adminShowPractice');

Here's my Controller:

   public function showPractice($id)
    {
        //
            echo $id;
            exit();
      
    }


I'm thinking this should be cake and ice cream, but I keep getting a 404 error saying that this:

http://nomas.site/show/practice/1

...is not found.

Why?
LaravelPHP

Avatar of undefined
Last Comment
Bruce Gust

8/22/2022 - Mon
Dr. Klahn

This URL as shown relies on behavior in the server that may not be standard.

1.  Typically a web server FQDN begins with "www." -- in this case, the URL does not begin with "www." and the request then goes to a site which may, or may not, be the web server you desire.  Use the proper and full FQDN of the URL in the code which generates the URL.

2.  On some servers, the URL as shown would display the contents of the directory under /show/practice/1.  On other servers, the URL as shown would look for "index.html" in the directory /show/practice/1.  On still other servers, the URL as shown would look for "index.php", "index.shtml", "index.htm" or other variant in the directory /show/practice/1.  Use the proper and full specific file name that is to be accessed in the code which generates the URL.
ASKER CERTIFIED SOLUTION
Chris Stanyon

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Bruce Gust

ASKER
Sometimes I look in the mirror and wonder how such a sharp looking guy can be so...

...stupid.

Thanks, Chris! That was it. I'm questioning algorithms and call stacks...

Nope. Just change the link.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23