简体   繁体   English

访问另一个网站的htaccess

[英]Access htaccess of another website

How do I download an htaccess file from another website? 如何从另一个网站下载htaccess文件?

How do I view my own htaccess in my browser? 如何在浏览器中查看自己的htaccess?

I have tried to go to www.website.com/.htaccess but no success for example. 我试图去www.website.com/.htaccess,但是没有成功。

I know that there is a command that can be added to the htaccess file to disable viewing but I'm talking about htaccess files that do not include this code. 我知道有一个命令可以添加到htaccess文件中以禁用查看,但是我说的是不包含此代码的htaccess文件。

By default, Apache config has 默认情况下,Apache配置具有

# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ".ht*">
    Require all denied
</Files>

So you can't, or you shouldn't be able to. 所以您不能,或者您不应该能够。 It would be a security problem otherwise. 否则,这将是一个安全问题。

How do I download an htaccess file from another website? 如何从另一个网站下载htaccess文件?

That's not possible, .htaccess can contain sensitive information, that's why the default configuration prevents access to this file. 这是不可能的, .htaccess可能包含敏感信息,这就是默认配置阻止访问此文件的原因。

How do I view my own htaccess in my browser? 如何在浏览器中查看自己的htaccess?

You can modify the server configuration (see how to configure apache to view hidden ( . ) files? ) to unblock access to this file. 您可以修改服务器配置(请参阅如何配置apache以查看隐藏的( . )文件? )以取消阻止对此文件的访问。 But if you have access to this configuration, you probably have an access to the file, so you should be able to view it with another tool than your browser. 但是,如果可以访问此配置,则可能可以访问该文件,因此您应该能够使用浏览器以外的其他工具查看该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM