I have the following problem
I need two things:
- Redirect from unsafe HTTP to safe HTTPS and then
- Redirect from
https://example.com/index.htmltohttps://example.com/work-for-us
I know the first one I can obtain using:
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
and the second one using
RewriteEngine on
RewriteRule work-for-us index.html
But is it possible to connect those two together?
So I have both HTTP -> HTTPS and /index.html -> /work-for-us
I don't have too much knowledge about .htaccess file, I read something on the internet but didn't find anything that answers my question.
So putting everything together, I want to change the URL from this:
http://example.com/index.html to this https://example.com/work-for-us
Thank you in advance.