Hi, my host for my website Toroco is Ionos.
I have many sub-domains: https://softwares.toroco.fr, https://catalog-1.toroco.fr, etc. .
I read somewhere that is is better to put a htaccess with a RewriteRule so my .htaccess of my main domain is:
# Info glanées ça et là sur internet et sur site Ionos
# AddDefaultCharset UTF-8
RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^(.*)$ https://toroco.fr/$1 [R=301,L]
ErrorDocument 401 /error_401.html
ErrorDocument 403 /error_403.html
ErrorDocument 404 /error_404.html
I put exactly the same file .htaccess in each folder containing my sub-domains. It works, but I wonder if I should write my subdomain website instead of my main website:
RewriteRule ^(.)$ https://softwares.toroco.fr/$1 [R=301,L]
and
RewriteRule ^(.)$ https://catalog-1.toroco.fr/$1 [R=301,L]
etc.
Thank you.