Access htaccess of another website

12,655

Solution 1

By default, Apache config has

# 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.

Solution 2

How do I download an htaccess file from another website?

That's not possible, .htaccess can contain sensitive information, that's why the default configuration prevents access to this file.

How do I view my own htaccess in my browser?

You can modify the server configuration (see how to configure apache to view hidden (.) files?) to unblock access to this file. 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.

Share:
12,655
JoeRagu
Author by

JoeRagu

Updated on June 04, 2022

Comments

  • JoeRagu
    JoeRagu almost 2 years

    How do I download an htaccess file from another website?

    How do I view my own htaccess in my browser?

    I have tried to go to www.website.com/.htaccess but no success for example.

    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.