Avisos
Vaciar todo

redireccionar mi sitio web a WWW  

Página 1 / 2
 
Luis
 Luis
Estimable Member

cuando ingreso a mi sitio web por www.lasertextil.com todo esta bien, pero cuando entro sin el WWW el automaticamente que la gente navege me la tiene que convertir en www.lasertextil.com pero no lo hace
por ejemplo

ingreso url lasertextil.com , cuando yo oprima cualquier menu ejemplo contacto el me tiene que redireccionar de la siguiente manera www.lasertextil.com/contacto.html sierto

pero cuando entro por lasertextil.com me navega siempre sin el WWW osea lasertextil.com/contacto.html
¿ como puedo hacer para solucionar esto?

URL del sitio: Contenido solo visible a usuarios registrados

Citar
Respondido : 24/04/2013 11:40 am
Jordi Sala
 Jordi Sala
Miembro Admin

Hola Luis,

Revisa https://www.webempresa.com/blog/codigos-utiles-htaccess-para-wordpress.html

Saludos

ResponderCitar
Respondido : 24/04/2013 11:43 am

Cursos Gratuitos WordPress

Luis
 Luis
Estimable Member

muchas gracias este archivo me sirvio de mucha ayuda y aparte trae muchas mas mejoras para seo

ya pude solucionar mi problema
muchas gracias

pero ahofrfa el problema es el siguiente:
yo para ese dominio que es www.lasertextil.com tengo 4 dominios mas adicionales (trabajostextiles.com,bordadostextiles.com,etc...)
entonces si el codigo para redireccionar

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

¿COMO PUEDO HACER PARA QUE TODOS LOS OTROS DOMINIOS ME LOS REDIRECCIONE A WWW.LASERTEXTIL.COM Y NO SE QUEDEN NAVEGANDO POR LA URL QUE ENTREN SI NO QUE TODAS VAYAN AL MISMO?

O QUE ES MEJOR ? dejar varios dominios que navegen aparte o todos al mismo url?

ResponderCitar
Respondido : 24/04/2013 12:11 pm
Pablo Velasco
 Pablo Velasco
Illustrious Member

Hola,

Es mejor que se utilice siempre la misma url para la navegación. Mejora el posicionamiento.

Para redirigir de ciertos dominios a uno en particular tienes que utilizar un código como el siguiente:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule (.*)$  http://www.newdomain.com/$1  [R=301,L]

Aquí tendrás que cambiar los nombres de los dominios que se muestran por los tuyos.

ResponderCitar
Respondido : 24/04/2013 2:17 pm

optimiza-automaticamente-todas-las-imagenes-de-tu-wordpress

Luis
 Luis
Estimable Member

con el codigo anterior mente que me diste tengo que copiar 4 veces ese codigo para los 4 dominios que tengo
¿y todos los pego seguidos?
ejemplo

RewriteEngine On
RewriteCond %{HTTP_HOST} ^trabajostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.trabajostextiles.com$
RewriteRule (.*)$ http://www.lasertextil.com/$1 [R=301,L]

RewriteEngine On
RewriteCond %{HTTP_HOST} ^bordadostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.bordadostextiles.com$
RewriteRule (.*)$ http://www.lasertextilcom/$1 [R=301,L]

Y ASI SEGUIDO DE LOS DOS QUE FALTAN?

ResponderCitar
Respondido : 24/04/2013 3:49 pm
Pablo Velasco
 Pablo Velasco
Illustrious Member

Hola,

Podrías probar a juntarlos en uno solo y también te tendría que funcionar. Por ejemplo, el código anterior podría quedar de la siguiente manera:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^trabajostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.trabajostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^bordadostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.bordadostextiles.com$
RewriteRule (.*)$ www.lasertextilcom/$1 [R=301,L]
ResponderCitar
Respondido : 24/04/2013 3:57 pm

wpdoctor-revisa-la-salud-de-tu-wordpress

Luis
 Luis
Estimable Member

tengo un error y es que agrege el codigo que me digiste y no me las esta redireccionando
agrege el siguiente codigo guntando la primera sin el WWW y es el siguiente

RewriteEngine On
RewriteCond %{HTTP_HOST} ^lasertextil.com
RewriteCond %{HTTP_HOST} ^trabajostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.trabajostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^grabadotextil.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.grabadotextil.com$ [OR]
RewriteCond %{HTTP_HOST} ^bordadostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.bordadostextiles.com$
RewriteRule (.*)$ www.lasertextilcom/$1 [R=301,L]

pero no me redirecciona las otras url que hago?

ResponderCitar
Respondido : 24/04/2013 4:46 pm
Jhon
 Jhon
Soporte CMS Webempresa Moderator

Hola Luis

Si estas usando urls amigables para Joomla entonces verás que ya tienes código en el archivo .htacces

El código de redirección que uses debe ser lo primero que se encuentre en este archivo para que tenga efecto, mueve el código al inicio del archivo

Saludos.

ResponderCitar
Respondido : 24/04/2013 9:07 pm

Gestor de Contraseñas - VPN Conexión Segura - Gestor 2FA (Segundo Factor de Autenticación

Luis
 Luis
Estimable Member

no no mr logra servir el redireccionamiento de mis url´s
aqui dejo el archivo .htaccess adjunto para que lo puedan ver y me ayuden

muchas gracias

ResponderCitar
Respondido : 24/04/2013 11:32 pm
Luis Mendez Alejo
 Luis Mendez Alejo
Miembro Admin

Hola Luis,

No se muestra ningún código de redirección en el archivo htaccess.txt que adjuntas.

El archivo válido es el .htacces (oculto).

El archivo .htaccess es un archivo "oculto", por lo que para poderlo visualizar desde tu cPanel, cuando haces clic en el Administrador de Archivos te abre una ventana modal emergente y abajo una de las opciones dice "Mostrar Archivos Escondidos (dotfiles: .ejemplo)." que debes "activar" para que luego puedas visualizar los archivos ocultos.

Normalmente el archivo .htaccess lo localizas en la carpeta /public_html aunque es posible encontrarlo en otras según configuraciones de determinadas extensiones o plugins.

Cuando localizas dicho archivo, desde el dministrador de Archivos lo seleccionas y con el botón derecho puedes elegir la opción "Compress" (abajo del todo) y en Tipo de Compresión: marcas "Archivo Zip" y haces clic en el botón "Compress File(s)".

Luego lo descargas a tu PC seleccionándolo y con el icono superior "Descargar" lo descargas.

Entonces puedes adjuntarlo aquí en el Foro como un archivo desde la opción "Archivos Adjuntos".

Saludos

ResponderCitar
Respondido : 25/04/2013 1:09 am

Luis
 Luis
Estimable Member

ok ya esta el archivo .htaccess , el problema era que al descargarlo de mi navegador croohme me modificaba el nombre pero ya se los trage

ResponderCitar
Respondido : 25/04/2013 4:10 am
Johnny Heredia Montiel
 Johnny Heredia Montiel
Miembro Moderator

Hola Luis,

Descomprimo el fichero pero no me aparece nada. Trata de escribirlo utilizando el boton Ocultar el texto para los invitados.

Saludos.

ResponderCitar
Respondido : 25/04/2013 4:44 am

Cursos Gratuitos WordPress

Luis
 Luis
Estimable Member

otra cosa que observe fue que cuando agrege el codigo que me dieron anteriormente, se perdió la configuración de la cahe y se volvia mas lento mi sitio web
pero cuando me devolvi a el codigo de redireccionar solamente un dominio si me sirve por que?

ResponderCitar
Respondido : 25/04/2013 4:47 am
Luis
 Luis
Estimable Member

yo lo descomprimo y lo abro con notepad ++ pero bueno
vuelvo y subo en .htaccess

pero si algo aqui dejo el codigo
RewriteEngine On
RewriteCond %{HTTP_HOST} ^lasertextil.com
RewriteCond %{HTTP_HOST} ^trabajostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.trabajostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^grabadotextil.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.grabadotextil.com$ [OR]
RewriteCond %{HTTP_HOST} ^bordadostextiles.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.bordadostextiles.com$
RewriteRule (.*)$ www.lasertextilcom/$1 [R=301,L]
##

# @package Joomla
# @copyright Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
##

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

## Mod_rewrite in use.

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*([^)]*) [OR]
# Block out any script that includes a tag in URL.
RewriteCond %{QUERY_STRING} (|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
ExpiresActive On
ExpiresByType image/gif A432000
ExpiresByType image/jpg A432000
ExpiresByType image/jpeg A432000
ExpiresByType image/png A432000
ExpiresByType image/ico A432000
ExpiresByType image/bmp A432000
ExpiresByType text/css A432000
ExpiresByType text/javascript A432000
ExpiresByType application/javascript A432000
ExpiresByType application/x-javascript A432000

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^ http://(.+.)?lasertextil.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpg|gif|bmp|png)$ [L]

Y QUE MAS MEJORAS LE PUEDO HACER AL .HTACCESS?

ResponderCitar
Respondido : 25/04/2013 4:53 am

optimiza-automaticamente-todas-las-imagenes-de-tu-wordpress

Johnny Heredia Montiel
 Johnny Heredia Montiel
Miembro Moderator

Hola Luis,

El codigo parece estar correcto, sin embargo nos comenta un tecnico que no tienes esta seccion de codigo en el .htaccess de tu servidor:

Contenido solo visible a usuarios registrados

Saludos.

ResponderCitar
Respondido : 25/04/2013 4:57 am
Página 1 / 2