2
I’m struggling with something, I have various conditions to meet in mine. htaccess but I can never answer them at once, just once or twice.
I have a project in Laravel on the way /public_html/portal/
to display it I need to redirect the user to the folder /public_html/portal/public
So far so good, I have a . htaccess that does it. It follows the same below:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(|chat|infinite|cliente|cadastro)\.dominio\.com$ [NC]
RewriteRule ^(.*)$ portal/public/$1 [L]
The second line serves to directly access the respective domains, because I work with wildcards in my project.
The problem now
Based on this rewriting of line 3 how can I accomplish these two things:
- How can I force HTTPS.
- Redirect all access with
https://www.dominio.com
forhttps://dominio.com
Does this make 301 redirect? Missing also remove www.
– Guilherme Nascimento
Just follow the logic, in 12 minutes, on my lunch break, I’ll slap the answer.
– Wallace Maxters