.htaccess: where is located when not in www base dir

后端 未结 2 875
隐瞒了意图╮
隐瞒了意图╮ 2020-12-29 18:49

I may need to modify our .htaccess file. Problem is I can\'t find it. We have several subdomains along side each other in the vhosts directory, and each subdomain has an a

相关标签:
2条回答
  • 2020-12-29 19:29

    . (dot) files are hidden by default on Unix/Linux systems. Most likely, if you know they are .htaccess files, then they are probably in the root folder for the website.

    If you are using a command line (terminal) to access, then they will only show up if you use:

    ls -a
    

    If you are using a GUI application, look for a setting to "show hidden files" or something similar.

    If you still have no luck, and you are on a terminal, you can execute these commands to search the whole system (may take some time):

    cd /
    find . -name ".htaccess"
    

    This will list out any files it finds with that name.

    0 讨论(0)
  • 2020-12-29 19:35

    The .htaccess is either in the root-directory of your webpage or in the directory you want to protect.

    Make sure to make them visible in your filesystem, because AFAIK (I'm no unix expert either) files starting with a period are invisible by default on unix-systems.

    0 讨论(0)
提交回复
热议问题