当我请求文件时
https://www.hello.com.au/myfile.txt
我收到一个错误“找不到”。请求的URL
https://www.hello.com.au/myfile.txt
在此服务器上找不到。"
这是我的。htaccess规则,在我的开发网站上运行良好,但在生产环境中不起作用。
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(?:www\.)?hello\.com\.au$ [NC]
RewriteRule ^myfile\.txt$ - [NC,F]
</IfModule>