Redirection issue after deployment local to live server

Published 7 months ago by monum

Laravel is redirecting back to same page whenever i am hitting any post route like login or register, or contact forms.

Best Answer (As Selected By monum)

ok, its not possible to login although I might have registered? The issue is that there are no session cookies being sent so the request to login etc comes in but cannot be linked to any previous activity.


Sounds like the action on your <form> tag may be bringing you to the wrong route.

Can you show how your view file looks like? Also your LoginController if you have changed it in any way.


I have already setup this project on localhost and it is working fine there. Then i have deployed it where i am facing this issue.

My Auth system is also not working whenever i am submitting the form. it redirect me at home page withot login.


7 months ago (995,795 XP)

have you checked permissions on the storage folder? It sounds like Laravel cannot create any session files


Yes i have checked. there is not any problem in permission. and laravel is also creating files in session folder for each login.

"contact us" form is also not working. Its also redirecting on home without submitting the form. We don't need to login here.

Url is :


once check those permissions what @Snapey said. i wonder ! how smart you are? @Snapey


I am sure about this . There is not any issue with file permission.

Would you please visit the site ? There you will find its redirect to home with every for every post route and sometimes with get routes also.

with a text "Redirecting to".


Miss Monum your site is not redirecting to your home i checked it right now but i am sure there is no problem with your code but something is happing with your browser i think you may installed some browser Plugins recently or your PC (Terminal) has problem.


I'm guessing is the home path to your Laravel app.

Don't forget to update APP_URL in your .env configuration so that router builds the correct URLs for you.


@arukomp my .env file contains

APP_NAME=Requestbay APP_ENV=local APP_KEY=base64:n5rt9E0dQX/MFmAhPReC3BvtWC9pDyLIcmQ5v1sQiZI= APP_DEBUG=true APP_LOG_LEVEL=debug APP_URL=



I am Mr. Monu. :) I have already checked this site in more then on PC. and i have same issue with all PCs and browsers.

Is there any other solution?


[HTTP/1.1 301 Moved Permanently 336ms]

This is the extra get request what i found in console of browser for live site. This line is not showing in localhost.

Is there any issue related this line?

7 months ago (995,795 XP)

Your pages work fine. I can access them all.

Unfortunately I can also access your .env file so I suggest you take the site down, change your app key and any exposed secrets

For instance, your database password is me******5$

You then need to consider how to correctly serve the site which does not include copying everything into one folder.


Yes i know anyone can access by url. I will make it secure also.

And yes! I have to say, you are really expert in Laravel.

But for now i have to solve my redirecting issue. do you have any solution for this?


Have you checked your middlewares.


Maybe the controller handling your post routes has a middleware.

Please sign in or create an account to participate in this conversation.