I'm starting to learn about the Apache .htaccess
and I have some issues in my website...
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} ^example$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.net$
RewriteCond %{REQUEST_URI} !myfolder-public/
RewriteRule (.*) /myfolder-public/$1 [L]
The second RewriteRule
exists because I need a different folder (called myfolder-public
) to redirect my domain, but when I put this on web browser: example.com
without HTTPS the page redirects to: example.net/https:/example.net
and I don't know how to fix that, any help?