1

Here is what I currently have in the .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

I am trying to make it so when a visiter visits the website: www.example.com instead of loading index.php I want it to load folder/index.php instead.

I saw something online like this RewriteRule ^index.php /folder [R=301] , but that doesnt seem to work.

Is there a way to do this, while keeping the functionality the .htaccess currently has.

1 Answer 1

1

You can use:

RewriteEngine On

# http => https 
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,NE,R=302]

# load folder/index.php for landing page
RewriteRule ^/?$ folder/index.php [L]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.