HTACCESS:通过浏览器将文件下载为另一个文件名



我需要一些帮助。我怎么能做这些事情,使用 htaccess 下载。 我想要这种方式。

当前网址:

https://example.com/comp/test1.zip

要成为

https://example.com/comp/Archive.zip

其中 Archive.zip 是静态值

你需要将/comp/Archive.zip 重写为/comp/test1.zip

在你的/root/.htaccss 中试试这个

RewriteEngine on
RewriteRule ^comp/Archive.zip$ /comp/test1.zip [L,NC]

最新更新