Reputation: 6509
I want to create a handful of URL's on my server that allow you to download a file from a "direct link" but not a direct link such as www.website.com/file-for-download.exe
I'd like it to just be www.website.com/download
and then it would start downloading the .exe
So I would essentially have:
www.website.com/download
www.website.com/download2
www.website.com/download3
Each with it's own file that will give you the option to download when you visit the link.
How can I create a URL that doesn't end with ".html" but starts a download link?
Upvotes: 1
Views: 2130
Reputation: 1
function onTelegramAuth(user) { alert('Logged in as ' + user.first_name + ' ' + user.last_name + ' (' + user.id + (user.username ? ', @' + user.username : '') + ')'); }
Upvotes: 0
Reputation: 44888
You can use your .htaccess
file to do this.
RewriteRule ^download$ "/file.exe" [P]
Then when you type http://example.com/download
you'll download the file called file.exe
Upvotes: 1