V2EX  ›  英汉词典

Htaccess

释义 Definition

.htaccess 是 Apache(以及部分兼容服务器)中的“分布式配置文件”,用于在某个目录及其子目录范围内覆盖或补充服务器配置,例如:URL 重写(Rewrite)、访问控制、重定向、设置默认首页、基础认证等。(在 Nginx 中通常不使用它,而是改在主配置里完成。)

发音 Pronunciation (IPA)

/ˌeɪtʃtiːˈækses/

例句 Examples

I edited the .htaccess file to redirect HTTP to HTTPS.
我编辑了 .htaccess 文件,把 HTTP 重定向到 HTTPS。

Because the hosting plan doesn’t allow changing the main server config, we implemented URL rewriting and basic authentication through .htaccess in the project folder.
因为主机方案不允许修改服务器主配置,我们就在项目目录里通过 .htaccess 实现了 URL 重写和基础认证。

词源 Etymology

“.htaccess” 这个名称通常被解释为 hypertext access(超文本访问) 的缩写,最初用于在不改动全局服务器配置的情况下,对特定目录的访问规则进行控制。前面的点号(.)在类 Unix 系统里常表示“隐藏文件”。

相关词 Related Words

文学与作品 Literary Works

  • Apache: The Definitive Guide(Ben Laurie & Peter Laurie)——讲解 Apache 配置体系与 .htaccess 的用途与限制
  • Pro Apache(Peter Wainwright)——包含 .htaccess、mod_rewrite 等常见场景配置示例
  • Learning PHP, MySQL & JavaScript(Robin Nixon)——在网站部署与重写/权限控制章节中常提到 .htaccess 的实践用法
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   741 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 19:13 · PVG 03:13 · LAX 11:13 · JFK 14:13
♥ Do have faith in what you're doing.