-1
我需要一些幫助。我怎麼能做到這一點,使用htaccess下載。 我想要這樣。HTACCESS:通過瀏覽器下載文件作爲另一個文件名
當前網址:
https://example.com/comp/test1.zip
是
https://example.com/comp/Archive.zip
其中Archive.zip是一個靜態值
我需要一些幫助。我怎麼能做到這一點,使用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]
你的服務器上哪個URL存在試試這個?第一個還是第二個? – starkeen
@starkeen第一個 – rkevx21