I have a problem here, I do not have knowledge with .htaccess
and I'm not able to configure it.
I need to redirect the www domain to the www domain, an error is that it is redirecting all HTTPs domains to and the root folder is not the default, but this occurs only when I type to access HTTPs . p>
While the correct one would be http://meusite.com/meusite.com
, could they pass me the codes to create the file https://meusite.com
?
I need the codes with the two items I quoted and at the end the code to redirect all URLs to access https to do some testing here.
Here is my code that is not working:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^classificadosjs.com.br [NC]
RewriteRule (.*) https://www.classificadosjs.com.br/ [R,L]
RewriteCond %{HTTP_HOST} ^classificadosjs.com.br$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.classificadosjs.com.br$
RewriteCond %{REQUEST_URI} !/home/classif3/public_html/classificadosjs.com.br/
RewriteRule (.*) /home/classif3/public_html/classificadosjs.com.br/$1 [L]
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
RewriteCond %{REQUEST_URI} !^/home/classif3/public_html/classificadosjs.com.br/
RewriteRule ^(.*)$ /home/classif3/public_html/classificadosjs.com.br/$1 [L,R=301]
RewriteCond %{HTTPS_HOST} ^www.classificadosjs.com.br [NC]
RewriteRule ^(.*)$ https://www.classificadosjs.com.br/$1 [R,L]
Note: I do not know if I should put .htaccess
at the end? In case I put it and it did not work anymore, sorry I am very without knowledge in the subject.