【发布时间】:2015-06-12 11:06:21
【问题描述】:
我在一个目录上有很多 joomla 网站。我从 apache 转移到 nginx。但是现在我在 nginx 上重写有问题。我需要所有在 subdir 中的 joomla 都可以像 public_html/ 中的第一个 web 一样使用 rewrite 。它可以只为一个人工作。有没有可以在所有子目录上设置使用重写的解决方案?
这是来自启用站点的我的 hostname.conf 文件。
当我为一个网络重写时
location / {
expires 1d;
try_files $uri $uri/ /index.php?$args;
}
或子文件夹中的某个:
location /test/test/test/ {
expires 1d;
try_files $uri $uri/ /test/test/test/index.php?$args;
}
但我需要重写,以便所有 joomla 文件夹都可以在所有目录中工作。因为我的文件夹中有很多 joomla,而且我需要所有的 rewrite mod。我需要解决方案。
【问题讨论】:
标签: .htaccess mod-rewrite nginx joomla rewrite