[AYUDA] Cambiar hostname

Iniciado por Miseryk, 20 Mayo 2015, 16:21 PM

0 Miembros y 1 Visitante están viendo este tema.

Miseryk

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.
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

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

Código (apache) [Seleccionar]

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


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

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

Miseryk

#2
Cita de: MinusFour en 20 Mayo 2015, 18:21 PM
Si estas usando Apache, hay una entrada de ellos que habla sobre canonical hostnames:

Código (apache) [Seleccionar]

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


Practicamente reescribe todas los dominios a:
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 (html4strict) [Seleccionar]

<link rel="canonical" href="http://hostfruta.net/" />





Código (html4strict) [Seleccionar]

$('link[rel=canonical]').attr('href', 'fake.com');
$('link[rel=alternate]').attr('href', 'fake.com/rss/public');


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

Mod: No hacer doble post.
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!!!