.htaccess:不在 www 基目录时的位置 [英] .htaccess: where is located when not in www base dir

查看:24
本文介绍了.htaccess:不在 www 基目录时的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能需要修改我们的 .htaccess 文件.问题是我找不到.我们在 vhosts 目录中有几个相互并排的子域,每个子域都有一个关联的 .htpasswd 文件.如何找到 .htaccess 文件的位置.

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 associated .htpasswd file. How can find where the .htaccess file is.

显然,这不是我设置的,我当然不是 Unix 管理员专家.

Obviously, I didn't set this up and I'm certainly not known as an unix admin expert.

推荐答案

.(点)文件在 Unix/Linux 系统上默认是隐藏的.最有可能的是,如果您知道它们是 .htaccess 文件,那么它们很可能位于网站的根文件夹中.

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

如果您使用的是 GUI 应用程序,请寻找显示隐藏文件"或类似设置.

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.

这篇关于.htaccess:不在 www 基目录时的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆