Covering up URL address on href

Asked

Viewed 123 times

3

I wonder how I can cover up the original address of a url following the example of this url following the parameters of url of the server I use http://thumb.servidor.direto.com.br/15574899.mp4 to look like this on href="/linkdireto/15574899.mp4 where the direct link is from a hosting server and I do not have access to it to create a .htacess and any other type of server change once I upload file and it generates a URL to copy.

There is possibility to do this with php or in the htacess on my website ?

  • can do this with httaccess on your server, regardless of the file being on another server.

1 answer

2


If I understand correctly, create a php script with the name you want and paste the code below replacing the URL with the destination url (of the file) I’ll fix the code display as soon as I get home

Example:

<?php

#Fill this variable with the destination URL $redirect = "http://server/files/media/loading.mp4";

header("Location:$redirect"); ?>

  • In case I would create a link type like this in href="link.php? id=15574899" to make this value if applied to $redirect = "http://thumb.servor.directo.com.br/$_GET["id"]. mp4"; thus opening the header ?

  • Already got here thanks to your help do what I wanted thanks for the help.

  • If you do this with the intention of hiding from the user, you are doing it wrong. Instead write the content of the request in the body of the reply.

  • A good tip if you want to hide and use post through a Hidden form

Browser other questions tagged

You are not signed in. Login or sign up in order to post.