.htaccess - Problems adding SSL redirect to htaccess file on host -


i have htaccess

rewriterule ^(?:languages|sources|upload|templates_c)\b.* index.php/$0 [l] 

and when add

rewriteengine on rewritecond %{https} !=on rewriterule ^/?(.*) https://%{server_name}/$1 [r,l] 

it not work how add ssl made htaccess file.

thanks

do not use server_name variable. not configured on shared hosting , dependent on usecanonicalname directive. depending on server may off or not configured among other things. try this.

rewriteengine on rewritecond %{https} !^on rewriterule ^/?(.*)$ https://%{http_host}/$1 [r=301,l]  rewriterule ^(?:languages|sources|upload|templates_c)\b.* index.php/$0 [l] 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -