• ¡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

Ayuda Redireccion pagina web

akkr

XenForoUser
Mensajes
60
Puntuación de reacciones
4
Puntos
8
País
España
Versión de XenForo
2.1.x
Página web
Web
Me estoy volviendo loco para redirigir el foro de www.foroocio.com a Foro Ocio en el .htaccess pero no soy capaz. Esto es lo que pongo pero nada.

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

    #    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]
 

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.foroocio.com$ [NC]
RewriteRule ^(.*)$ https://foroocio.com/$1 [L,R=301]

</IfModule> Redirect 301 / Foro Ocio
 

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
Prueba con:
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 de www a sin www - Redirigir de www.midominio.com a midominio.com
    RewriteCond %{HTTP_HOST} ^www\.foroocio\.com [NC]
    RewriteRule ^(.*)$ https://foroocio.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://foroocio.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
Arriba