Laravel route not found with https

laravel routes not working on live server
laravel page not found but route exists
laravel 404 not found apache
laravel 5.7 routes not working
laravel routes not working, apache
object not found error 404 laravel
laravel api route not found 404
laravel force https

I have a simple route defined in routes.php on top of any route:

Route::get('/test', function () {
echo 'hello';
});

It is working when access through http but it gives:

The requested URL /test was not found on this server.

When I try to access through https.

I have searched a lot on internet but couldn’t find any solution.

My main page is loading with both http and https but other routes not working. Do I need some extra configurations?

Edit:

.htaccess:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On


    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]


</IfModule>

Please guide me.

Thanx.

Laravel Route did't work on Https server, Why Laravel Routes are not working in https server? Yes i have set correct url. but not work route not found. but it work in http server. Forum Laravel How I can force all my routes to be HTTPS not HTTP. Reply Follow How I can force all my routes to be HTTPS not HTTP. Because http works good,

I am facing the same issues and I resolved it by simply modified my .htaccess file. Generally this is problem with our rewrite module. try this hope it work for you.

 <IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

Also make sure folder structures match on local and production servers.

Laravel 5.8 - Route not working { HTTPS }, I have installed aravel 5.8 on ubuntu 18.04 and apache2 with SSL apache self-​signed cert but basic routes not working . still i see:  Forum Laravel Laravel 5.8 / Route not found (404 error) but exist. Reply Follow All Threads Popular This Week Popular All Time Solved Unsolved No Replies Yet

If someone will have a problem with infinity loop in Laravel there is a solution:

RewriteEngine On

# If we receive a forwarded http request from a proxy...
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]

# ...or just a plain old http request directly from the client
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on

# Redirect to https version
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Not found, but route exists., same problem here, '/' route is working but the others not work ! why ? 0 Nginx. https://www.digitalocean.com/community/tutorials/apache-vs-nginx-practical-  All Laravel routes “not found” on nginx. 2. How can I get Lumen 5.4 routes to work on nginx 1.12.1? Related. 986. Password reset laravel 5.7, route is defined.

Routing with https, Setting url to 'https://www.domain.com' in config/app.php instead of I am trying '​https' => true with Route::group() but it is not working. The Main problem of route not working is there is mod_rewrite.so module in macos, linux not enabled in httpd.conf file of apache configuration, so can .htaccess to work. i have solved this by uncomment the line :

Why do my laravel routes not work?, But when i start going to other pages like http://-ip-adress-*/test * it gives me a 404 Not found errorpage. After going trough some forums i think it  Basic Routing. The most basic Laravel routes accept a URI and a Closure, providing a very simple and expressive method of defining routes: Route::get('foo', function { return 'Hello World'; }); The Default Route Files. All Laravel routes are defined in your route files, which are located in the routes directory. These files are automatically

Routing - Laravel, Most of the routes for your application will be defined in the app/routes.php file. Forcing A Route To Be Served Over HTTPS If the filter returns a response, that response is considered the response to the request and the route will not  My laravel app work in localhost but when I try to deploy on Shared hosting without ssh my route app not work, just '/' URL is work but when I call any route it returns 'Not found' "the reques

Comments
  • I think this will work even in 5.2. stackoverflow.com/questions/28402726/…
  • "Doesn't work for me" would be more appropriate, @RaeIan. Nothing has changed in Laravel 5.8 (laravel.com/docs/5.8/releases) that would make this fix obsolete. APP_URL is still there and the rest is Apache configuration that has nothing to do with the Laravel version. You simply have a different problem.
  • Please have a look on my .htaccess should I need to change it? since I paste your .htaccess and it gives internal server error.
  • replace the <your project path> with your project path
  • just add this line in your .htaccess file 'RewriteBase <your project path>'
  • I did what you suggested but It gives internal server error for all routes. . but main page is loading properly
  • Let us continue this discussion in chat.