elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado:


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web (Moderador: #!drvy)
| | |-+  [AYUDA] Cambiar hostname
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [AYUDA] Cambiar hostname  (Leído 1,954 veces)
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
[AYUDA] Cambiar hostname
« en: 20 Mayo 2015, 16:21 pm »

Buenas a todos, tengo muy poco conocimiento sobre el tema web, pero recuerdo que hace mucho hice algo que no estoy pudiendo hacer ahora.

Yo tenía una web llamada "pepe.com.ar" (ejemplo), por otra parte tenía un dns o lo que sea que era "fake.com" que yo al poner "fake.com" me redireccionaba a "pepe.com.ar", el punto es que cuando cargaba "pepe.com.ar" de alguna manera yo cambiana el path y aparecía como "fake.com" y si tenía por ejemplo "pepe.com.ar/foro/index.php=?babla", en el url me aparecía "fake.com/foro/index.php=?babla" y no se recargaba la página cosa que para el usuario es imperceptible,  alguno sabe como podría replicarlo?

Saludos.


En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
MinusFour
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.529


I'm fourth.


Ver Perfil WWW
Re: [AYUDA] Cambiar hostname
« Respuesta #1 en: 20 Mayo 2015, 18:21 pm »

Si estas usando Apache, hay una entrada de ellos que habla sobre canonical hostnames:

Código
  1. # And for a site running on port 80
  2. RewriteCond %{HTTP_HOST}   !^www\.pepe\.com\.ar [NC]
  3. RewriteCond %{HTTP_HOST}   !^$
  4. RewriteRule ^/(.*)         http://www.pepe.com.ar/$1 [L,R]

Practicamente reescribe todas los dominios a:
Código:
www.pepe.com.ar

http://httpd.apache.org/docs/2.0/rewrite/rewrite_guide.html#canonicalhost


En línea

Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: [AYUDA] Cambiar hostname
« Respuesta #2 en: 20 Mayo 2015, 19:38 pm »

Si estas usando Apache, hay una entrada de ellos que habla sobre canonical hostnames:

Código
  1. # And for a site running on port 80
  2. RewriteCond %{HTTP_HOST}   !^www\.pepe\.com\.ar [NC]
  3. RewriteCond %{HTTP_HOST}   !^$
  4. RewriteRule ^/(.*)         http://www.pepe.com.ar/$1 [L,R]

Practicamente reescribe todas los dominios a:
Código:
www.pepe.com.ar

http://httpd.apache.org/docs/2.0/rewrite/rewrite_guide.html#canonicalhost

El tema es que no tengo acceso a éso, hay alguna manera de hacerlo en tiempo real o algo así?

En el que estoy se crea una entrada (html) =>

Código
  1. <link rel="canonical" href="http://hostfruta.net/" />
  2.  



Código
  1. $('link[rel=canonical]').attr('href', 'fake.com');
  2. $('link[rel=alternate]').attr('href', 'fake.com/rss/public');
  3.  

Inclusive con éso, cuando paso por encima de un enlace me muestra el original.

Mod: No hacer doble post.
« Última modificación: 25 Mayo 2015, 17:36 pm por #!drvy » En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Red Wireless me cambia mi hostname
Seguridad
reem 0 1,896 Último mensaje 21 Febrero 2012, 19:19 pm
por reem
ayuda cambiar nombre de equipo HOSTNAME wifiway 3.0.4
Wireless en Linux
isipawn 2 4,284 Último mensaje 4 Septiembre 2012, 18:44 pm
por 82naros
Variable hostname en batch
Scripting
santi810 2 2,775 Último mensaje 20 Diciembre 2013, 17:46 pm
por santi810
Hostname y Servidores DNS en Centos 7
Redes
Ali Baba 1 1,895 Último mensaje 1 Diciembre 2018, 15:23 pm
por #!drvy
Obtener IP con hostname
Java
GSecurity 3 2,212 Último mensaje 3 Abril 2020, 17:23 pm
por rub'n
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines