I’m trying to redirect the
1. divert http (80) to https 443
2. must redirect server root to sub folder https://www.domain/edu
I installed moodle in root with a sub folder https://www.domain/edu
my . htaccess code
what is does, its only redirect http://domain to https://www.domain/edu/ and no https gets directed to edu when submitting https://www.domain
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domain/edu/$1 [R,L]
thanks
Try:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Remove the 'edu/' in yours.
'SoS', Ken
Thx for responding. It must also redirect to the subfolder edu. Moodle installed in subfolder edu from the root https://www.yourdomain.com/edu/
Thx
See
Keep what you have to redirect port but add:
RewriteRule ^$ /edu/ [L]From url above:
Automatically loading a subdirectory
This example redirects the ROOT domain's URL to any subdirectory. In this example, it automatically loads example.com/subdir1:
RewriteEngine on RewriteRule ^$ /subdir1/ [L]
For good measure, restart apache service. 
'SoS', Ken
Thankyou so much,,,, it worked.
Glad to hear it ... now a thought ... if one doesn't force to /edu/ but uses an index.php flle that auto-forwards to /edu/ or a static page with a link ... that would allow you to install a 'dev' moodle in /dev/. /dev/ would be a small instance where admins could try out plugins etc.
My 2 cents!
'SoS', Ken