1
Well I have a website hosted at UOL, and I’m going through a strange problem.
The structure of the site is so:
| index.html
| .htaccess
|
|app1
| | .htaccess
| |index.html
|
|app2
| | .htaccess
| |index.html
Good my file . Root htaccess is like this:
RewriteEngine On
# Redirecionar para HTTPS WC
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Already . htaccess file of the folder app1
and app2
is like this:
# Redireciona as requisições para index.html
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*) index.html [NC,L]
</IfModule>
The problem is that when someone accesses app1 or app2 . htaccess from the root does not force the use of ssl.
To work I have to put a . htaccess inside each app the same rule of the root.
Have some way to force ssl through the Rais . htaccess?
As far as I know, apache inherits htaccess settings from the root folder to the subfolders... Maybe you have some configuration for this, but cmg always worked in the pattern.
– LipESprY