• ¡Bienvenido a XenFácil!

    Estás viendo el sitio como Invitado. Para poder participar en este sitio

    y obtendrás privilegios adicionales, acceso a otras áreas y mucho mas.

    ¡Es gratis!


    ¿Ya eres miembro? Inicia sesión

Solucionado enlaces sin ssl

Estado
Cerrado para nuevas respuestas

iorG19

XenForoUser
Mensajes
200
Puntuación de reacciones
15
Puntos
18
Sitio web
ioforos.com
País
España
Versión de XenForo
Ninguna
Página web
Web
Ya no tengo SSL y también he borrado el .htaccess modificado a medida y lo he remplazado por el que trae la plataforma; ahora bien, quisiera hacer unos cambios en mi .htaccess:

Como bien dice el título, antes tenía SSL y ahora ya no, pues quiero redireccionar todo lo que tenga que ver con https:// con o sin www. hacía dominio.com ... Es decir:

Insertar CODE, HTML o PHP:
https:// =>> http://
https://www. =>> http://
http://www. =>> http://
redireccionar TODO hacía

Insertar CODE, HTML o PHP:
http:// (a secas)
:cool:
Gracias de antemano & Saludos!::cigar::
 

iorG19

XenForoUser
Mensajes
200
Puntuación de reacciones
15
Puntos
18
Sitio web
ioforos.com
País
España
Versión de XenForo
Ninguna
Página web
Web
no va, no me redirecciona. solo si pongo www pero si pongo https delante, ya no va!
 

lms

Administrador
Mensajes
7.741
Puntuación de reacciones
2.163
Puntos
2.613
Sitio web
xenfacil.com
País
España
Versión de XenForo
2.1.x
PayPal
Donar dinero a este usuario
Página web
Web
Insertar CODE, HTML o PHP:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^escritoriobase\.com
RewriteRule (.*) http://escritoriobase.com/$1 [L,R=301]
Si que te está funcionando a medias. aquí tienes puesta tu web como novedades y cuando haces clic accedes a novedades y si das a https://www.escritoriobase.com, cuando haces clic accedes a una página de error

Salud2
 

Tize

XenForoUser
Mensajes
356
Puntuación de reacciones
54
Puntos
28
Sitio web
xenfacil.com
País
España
Versión de XenForo
Página web
Web
gracias, he encontrado algo un poco más semejante aquí Frequently Asked Questions espero que me ayude. Gracias de todas formas!
Hola buenas!
Como pudiste solucionarlo el añadir certificado SSL + quitar las WWW ?
He seguido los pasos de la web inclusive añadí al config.php la línea de forzar pero no logro ponerlo en marcha.

Te adjunto mi htaccess por si puedes brindar un poco de ayuda.
Gracias.

PHP:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
    RewriteEngine On

       # Z
           RewriteCond %{HTTP_HOST} ^www\.([^.]+)\.([^.]+)$
           RewriteRule ^(.*)$ http://%1.%2/$1 [R=301,L]
       # /Z


    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]



    Options +FollowSymlinks
    #Protect against hotlinking
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www.)?ddirecta.com/ [nc]
    RewriteRule .*.(gif|jpg|png|jpeg)$ http://ddirecta.com/imagenes/norobarimagenes.jpg[nc]
</IfModule>

<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault A604800
<filesmatch ".(jpg|JPG|gif|GIF|png|css|ico|js)$">
  ExpiresDefault "access plus 7 day"
</filesmatch>

<FilesMatch ".(js|css)$">
# 7 days
ExpiresDefault A604800
Header append Cache-Control "public"
</FilesMatch>
</ifmodule>
 

luis

Administrador
Mensajes
1.636
Puntuación de reacciones
727
Puntos
613
Sitio web
xenfacil.com
País
España
Versión de XenForo
1.5.12
PayPal
Donar dinero a este usuario
Página web
Web
Esto es lo que tengo y me está funcionando, colocar debajo de:
PHP:
<IfModule mod_rewrite.c>
   RewriteEngine On

Rich (BB code):
##########################################################################################
   
   ##Redirigir de www a sin www - Redirigir de www.midominio.com a midominio.com
   RewriteCond %{HTTP_HOST} ^www.midominio.com [NC]
   RewriteRule ^(.*)$ http://midominio.com/$1 [L,R=301]   
   
   ##Redirigir de http a https - Redirigir de http://midominio.com a https://dominio.com
   RewriteCond %{SERVER_PORT} 80
   RewriteRule ^(.*)$ https://midominio.com/$1 [R,L]
   
  ##########################################################################################

Cambiar midominio.com por lo que corresponda...
 

Tize

XenForoUser
Mensajes
356
Puntuación de reacciones
54
Puntos
28
Sitio web
xenfacil.com
País
España
Versión de XenForo
Página web
Web
Esto es lo que tengo y me está funcionando, colocar debajo de:
PHP:
<IfModule mod_rewrite.c>
   RewriteEngine On

Rich (BB code):
##########################################################################################
  
   ##Redirigir de www a sin www - Redirigir de www.midominio.com a midominio.com
   RewriteCond %{HTTP_HOST} ^www.midominio.com [NC]
   RewriteRule ^(.*)$ http://midominio.com/$1 [L,R=301]  
  
   ##Redirigir de http a https - Redirigir de http://midominio.com a https://dominio.com
   RewriteCond %{SERVER_PORT} 80
   RewriteRule ^(.*)$ https://midominio.com/$1 [R,L]
  
  ##########################################################################################

Cambiar midominio.com por lo que corresponda...


Hola, voy a probar muchas gracias.
 

Tize

XenForoUser
Mensajes
356
Puntuación de reacciones
54
Puntos
28
Sitio web
xenfacil.com
País
España
Versión de XenForo
Página web
Web
Esto es lo que tengo y me está funcionando, colocar debajo de:
PHP:
<IfModule mod_rewrite.c>
   RewriteEngine On

Rich (BB code):
##########################################################################################
  
   ##Redirigir de www a sin www - Redirigir de www.midominio.com a midominio.com
   RewriteCond %{HTTP_HOST} ^www.midominio.com [NC]
   RewriteRule ^(.*)$ http://midominio.com/$1 [L,R=301]  
  
   ##Redirigir de http a https - Redirigir de http://midominio.com a https://dominio.com
   RewriteCond %{SERVER_PORT} 80
   RewriteRule ^(.*)$ https://midominio.com/$1 [R,L]
  
  ##########################################################################################

Cambiar midominio.com por lo que corresponda...


Hola, debo tener algún parámetro mal de mi httacess ya que añadiendo los parámetros tuyos me da fallo.
No me carga, puedes si no es mucha molestía Luís pegar tu httacess al completo para copiarlo y pegarlo por favor ?
Adjunto el mío por si puedes ver que sucede también.
Muchas gracias.

PHP:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
    RewriteEngine On

       # Z
           RewriteCond %{HTTP_HOST} ^www\.([^.]+)\.([^.]+)$
           RewriteRule ^(.*)$ http://%1.%2/$1 [R=301,L]
       # /Z


    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]



    Options +FollowSymlinks
    #Protect against hotlinking
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www.)?ddirecta.com/ [nc]
    RewriteRule .*.(gif|jpg|png|jpeg)$ http://ddirecta.com/imagenes/norobarimagenes.jpg[nc]
</IfModule>

<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault A604800
<filesmatch ".(jpg|JPG|gif|GIF|png|css|ico|js)$">
  ExpiresDefault "access plus 7 day"
</filesmatch>

<FilesMatch ".(js|css)$">
# 7 days
ExpiresDefault A604800
Header append Cache-Control "public"
</FilesMatch>
</ifmodule>

Ni utilizando

PHP:
##Redirigir de www a sin www - Redirigir de www.midominio.com a midominio.com
RewriteCond %{HTTP_HOST} ^www.ddirecta.com [NC]
RewriteRule ^(.*)$ http://ddirecta.com/$1 [L,R=301]   
   
##Redirigir de http a https - Redirigir de http://midominio.com a https://dominio.com
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://ddirecta.com/$1 [R,L]

Ni tampoco usando:

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

#toredirect from www to non www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*) https://%1/$1 [R=301,L]

Quieren funcionar, gracias de antemano por tu tiempo.
 

luis

Administrador
Mensajes
1.636
Puntuación de reacciones
727
Puntos
613
Sitio web
xenfacil.com
País
España
Versión de XenForo
1.5.12
PayPal
Donar dinero a este usuario
Página web
Web
Este es el mio con los cambios hechos para tu dominio, pruébalo tal como va y si funciona tendrás que ir añadiendo los otros parámetros que tienes en el tuyo para el hotlinking y demás.

Insertar CODE, HTML o PHP:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On
  
    ##########################################################################################
  
    ##Redirigir desde una carpeta a la raiz - Redirigir de midominio.com/foro a mi dominio.com
    #Redirect 301 /foro/ http://midominio.com
    #RewriteRule ^foro/(.*)?$ /$1 [R=301,L]
  
    ##Redirigir de www a sin www - Redirigir de www.midominio.com a midominio.com
    #RewriteCond %{HTTP_HOST} ^www.ddirecta.com [NC]
    #RewriteRule ^(.*)$ http://ddirecta.com/$1 [L,R=301]  
  
    ##Redirigir de http a https - Redirigir de http://midominio.com a https://dominio.com
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://ddirecta.com/$1 [R,L]
  
    ##########################################################################################  

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 

lms

Administrador
Mensajes
7.741
Puntuación de reacciones
2.163
Puntos
2.613
Sitio web
xenfacil.com
País
España
Versión de XenForo
2.1.x
PayPal
Donar dinero a este usuario
Página web
Web
Prueba con esto:
PHP:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

    Options +FollowSymlinks
    #Protect against hotlinking
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www.)?ddirecta.com/ [nc]
    RewriteRule .*.(gif|jpg|png|jpeg)$ http://ddirecta.com/imagenes/norobarimagenes.jpg[nc]

       # Z
          RewriteCond %{SERVER_PORT} 80
           RewriteCond %{HTTP_HOST} ^www\.([^.]+)\.([^.]+)$
           RewriteRule ^(.*)$ https://%1.%2/$1 [R=301,L]
       # /Z
</IfModule>

<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault A604800
<filesmatch ".(jpg|JPG|gif|GIF|png|css|ico|js)$">
  ExpiresDefault "access plus 7 day"
</filesmatch>

<FilesMatch ".(js|css)$">
# 7 days
ExpiresDefault A604800
Header append Cache-Control "public"
</FilesMatch>
</ifmodule>

Salud2
 

Tize

XenForoUser
Mensajes
356
Puntuación de reacciones
54
Puntos
28
Sitio web
xenfacil.com
País
España
Versión de XenForo
Página web
Web
Hola chicos, muchas gracias a ambos por vuestro tiempo y ayuda.

Estuve probando ambas opciones sin éxito, en la primera opción del señor Luís me arroja error al acceder al https, y la web normal http no funciona, página en blanco.
Y en la segunda opción del señor Lms la web carga normal como si nada pero sin funcionar tampoco el https.

Espero que el problema no sea por tener cloudflare.
Ya que no le veo sentido que sea por ello. Muchas gracias por brindar vuestro apoyo.
 

Tize

XenForoUser
Mensajes
356
Puntuación de reacciones
54
Puntos
28
Sitio web
xenfacil.com
País
España
Versión de XenForo
Página web
Web

Tize

XenForoUser
Mensajes
356
Puntuación de reacciones
54
Puntos
28
Sitio web
xenfacil.com
País
España
Versión de XenForo
Página web
Web
Hola a todos, este tema ya está solucionado y os muestro cómo pude solucionarlo.

Hoy quité la suscripción con cloudfare ya que leí que es incompatible con las (SSL externas + NO www )
Resumiendo, a mi el dominio me gusta como tenéis aquí en Xenfácil sin las WWW, por tanto tuve que quitar la protección de cloudfare y al editar el httacess añadí éstas líneas que muestro en rojo y ahora tengo la web con SSL y sin las WWW.

Ahora falta añadir más datos al archivo, como por ejemplo la caducidad de las imágenes, la caché y poco más.

Muchas gracias a todos ustedes que me habéis ayudado, recibid un cordial saludo.


Rich (BB code):
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On


        RewriteCond %{SERVER_PORT} 80
        RewriteRule ^(.*)$ https://NOMBREWEB.com/$1 [R,L]

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
  • Me Gusta
Reacciones: lms
Estado
Cerrado para nuevas respuestas
Arriba