0
I need you not to show the actual physical address on a link to download a file on my site.
The file link I want it to look like this: [Urlsite]/downloads/filename.
And I’m trying to use the following code on my web.config:
<rule name="Downloads Redirecionar">
<match ignoreCase="true" url="^downloads/([a-zA-Z0-9_-]+).([a-zA-Z0-9_-]+)$" />
<action type="Rewrite" url="/public/arquivosDownload/{R:1}.{R:2}" appendQueryString="false" />
</rule>
But it’s not working. As if he didn’t use the rule. When I click to open a new tab the download link opens the page:
http://[Urlsite]/Downloads/filename.
without redirecting to:
http://[Urlsite]/public/fileDownload/filename.extensao
What I’m doing wrong that’s not working?
Is this really possible? Have you seen any post/tutorial explaining this?
– Leonardo Bonetti
So, worse than I don’t know if it is. They just told me here where I work that I have to do this scheme above. This was the first thing that went through my head, but I don’t know if it’s right.
– WitnessTruth