apache - Redirect sub domains to non-www https -


hi have developed web app in laravel. have 2 sub domains:

devpanel.example.com panel.example.com

we want make sure redirect www , http traffic https , non www. example:

http:// panel. example. com https:// panel. example. com  http:// www. panel. example .com https:// panel. example .com 

also subpages shall moved example http:// panel. example. com/users shall go https:// panel. example. com/users , http:// www. panel .example .com/users shall go https:// panel. example .com/users

if logged in app of course should redirect logged in state above scenarios.

since app done in laravel appends index.php in url when http redirected https. how can make sure remove this?

any on above amazing.

you can edit web.php file

if (env('app_env') === 'production') { url::forceschema('https');} 

add code above @ top force on pages.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -