apache/command-line Access a file only from specific url using .htaccess Posted February 13, 2023 SetEnvIf Referer my-domain.com internal # <Files *> order Deny,Allow Deny from all Allow from env=internal </Files> Thanks to: https://stackoverflow.com/questions/23364603/allow-accessing-a-file-only-from-specific-url-in-htaccess htaccess