![]() |
|
.htaccess - how to proxy all .exe files in a dir? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141) +---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50) +---- Thread: .htaccess - how to proxy all .exe files in a dir? (/showthread.php?tid=4510374) |
.htaccess - how to proxy all .exe files in a dir? - 'An0ny - Oct 27, 2014 how could i proxy all .exe files? example: i visit http://domain.com/file/randomstring.exe it will proxiy the file http://domain.com/file/1.exe any way of doing this with htaccess..? * - Zasto - Oct 27, 2014 http://corz.org/server/tricks/htaccess.php take a read of this it should help you. * - 'An0ny - Oct 27, 2014 (Oct 27, 2014 04:45 PM)Zasto Wrote: http://corz.org/server/tricks/htaccess.php take a read of this it should help you. I can use google myself, thanks. Haven't found any with the exact thing I am wanting. I am not too good with htaccess lol * - Kindfile - Oct 28, 2014 (Oct 27, 2014 04:53 PM)An0ny Wrote: I can use google myself, thanks. Hello An0ny, I believe the mod_rewrite module is what you are looking for. For documentation take a look here: http://httpd.apache.org/docs/trunk/rewrite/remapping.html Code RewriteEngine onSo in your case: Code RewriteEngine onYou can also use regex to match the file name. For example Code RewriteEngine onShould match {anything}.exe and point it towards 1.exe Hope this helped. Kind regards * - c x y k - Oct 28, 2014 It isn't possible to count the number of files, which I assume is what you want (1,2,3,4,etc.). * - Squito - Oct 28, 2014 .htaccess: Code RewriteEngine onfile.php: PHP Code * - 'An0ny - Oct 28, 2014 (Oct 28, 2014 06:34 AM)Kindfile Wrote: Hello An0ny, Thanks - exactly what I were looking for 🤝 |