Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/hostingn/public_html/wp-content/plugins/revslider/includes/operations.class.php on line 2758

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/hostingn/public_html/wp-content/plugins/revslider/includes/operations.class.php on line 2762

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/hostingn/public_html/wp-content/plugins/revslider/includes/output.class.php on line 3706

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/hostingn/public_html/wp-content/plugins/seo-ultimate/modules/class.su-module.php on line 1195
Activar certificado SSL en sitio web (html o php) | Hosting News, Hosting y Herramientas Google Suite

Activar certificado SSL en sitio web (html o php)

Si ya tenemos el certificado SSL instalado en nuestro hosting, es momento de activar ese certificado en nuestro sitio web, para esto, debo editar el archivo .htaccess, el cual esta en la carpeta www o public_html. Una vez abierto el archivo agrega el siguiente código:

 

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Guarda los cambios y cierra el archivo.

Si tienes WordPress puedes utilizar el siguiente código:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] Header always set Content-Security-Policy “upgrade-insecure-requests;”
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] </IfModule>
# END WordPress

 

 

 

Listo! tu sitio ya tiene el certificado SSL funcionando.

 

top