¿Como modificar todas las URLs?

(1/1)

Cergath:
Hola,

Me gustaría hacer algo parecido a taringa, que cuando das click en un archivo de Descarga te manda a una página que dice: Estás saliendo de taringa, y aparece una barra de taringa en la parte superior.

El Script en php ya lo tengo, pero quiero ahora hacer alguna especie de redirección por htaccess o que automáticamente transforme TODAS las URLs del sitio de:

http://google.com/ a: http://misitio.com/fuera.php?http://google.com/

¿Alguna idea?

Gracias!

#!drvy:
javascript como mucho... los enlaces trabajan directamente sobre el navegador..

Vamos que si el navegador ve un enlace a otra pagina, abre otra pagina, no se pasea por la tuya.


PD: Podrias con PHP hacer que filtre los enlaces, pero seria para nuevos enlaces.


Saludos

Shell Root:
Código
<html>
    <head>
         <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    </head>
    <body>
 
         <a href="http://foro.elhacker.net/profiles/shellroot-u327468.html" title="foro.elhacker.net">Shell Root - elhacker.net</a>
         <br>
         <a href="http://shellrootsecurity.blogspot.com/" title="in[S]eguridad [I]nformatica">Shell Root - in[S]eguridad [I]nformatica</a>
 
    </body>
 
    <script languaje="javascript">
 
         $(document).ready(function(){
              $('a').each(function( i ){
                   var urlFilter = 'http://shellroot?link=';
                   var urlModified = $(this).attr("href");
                   $(this).attr( "href", urlFilter + urlModified );
              });
         });
 
    </script>
</html>

Resultado:
Código
http://shellroot/?link=http://foro.elhacker.net/profiles/shellroot-u327468.html
http://shellroot/?link=http://shellrootsecurity.blogspot.com/

Navegación

[0] Índice de Mensajes