Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.htaccess - how to proxy all .exe files in a dir?

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..?
http://corz.org/server/tricks/htaccess.php take a read of this it should help you.
(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
(Oct 28, 2014 06:34 AM)Kindfile Wrote:  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/rewri...pping.html

Code
RewriteEngine  on
RewriteRule    ^/foo\.html$  /bar.html [PT]

So in your case:
Code
RewriteEngine  on
RewriteRule    ^/randsomstring\.exe$  /1.exe [PT]

You can also use regex to match the file name. For example
Code
RewriteEngine  on
RewriteRule    ^/.*\.exe$  /1.exe [PT]

Should match {anything}.exe and point it towards 1.exe

Hope this helped.

Kind regards

Thanks - exactly what I were looking for 🤝


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Dag0bertDuckMar 24, 2024 07:59 PM 4 217 Mar 24, 2024 07:59 PM
Last Post: memory
by MankOct 15, 2020 08:01 AM 4 145 Oct 15, 2020 08:01 AM
Last Post: Dolla$
by codasApr 18, 2020 05:54 AM 4 129 Apr 18, 2020 05:54 AM
Last Post: codas