How yo force https all Filament routes
Hello, how I can force al Filament routes yo use Https?
10 Replies
Probably you need to config laravel not filament. https://stackoverflow.com/a/44442699
Stack Overflow
Laravel HTTPS routes
today I decided to move my website to HTTPS. Early my website work on HTTP.
My problem is in misunderstood how Laravel pass HTTP and https in helpers function route('name')
I change my website UR...
Or to configure your server Apache/Nginx
If you just set your APP_URL in your .env to https. Laravel will pick that up and serve all routes with it.
As you say I have it configured, but if a user enters with http it does not redirect to https.
I don't know if you can see that it is on a subdomain.
It's not a filament problem. Your server configuration
I've tried this in .htaccess file but it doesn't work as I would like:
For example, if I put http://demo.domain.com/admin in the URL it redirects to https://demo.domain.com and I would like it to redirect to https://demo.domain.com/admin
Do you also want https://demo.domain.com to redirect to https://demo.domain.com/admin ?
As krekas said, nothing to do with Filament, it's just basic server config, I'm just interested.
Is your server using nginx as a proxy for Apache? I’m not an expert on this stuff but something to consider.
Really doubt it needs to be done in .htaccess
Normalizing the schema yes, best done in htaccess. Redirecting from / to /admin could be done in a Laravel route. Still no Filament.