【发布时间】:2026-01-26 09:15:01
【问题描述】:
我正在尝试在 xampp 上的 joomla 网站中调试重写。我观察到的是以下内容
- 网站正在运行
- 在 Joomla BE 中启用 URL 重写 后,所有链接都不起作用,但主页仍然有效。我得出结论,重写工作不正常。
- 我已在根目录中激活(重命名).htaccess
- 我已将 LogLevel warn rewrite:trace6 添加到 httpd.conf 并重新启动 Apache。
我咨询过http://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#logging 和http://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs
不确定这是否相关,但我的网站配置为:
<VirtualHost *:80>
UseCanonicalName Off
VirtualDocumentRoot "D:/srv/htdocs/%2/%1"
ServerAlias *.*.localhost
</VirtualHost>
在 httpd-vhosts.conf 中,使我能够拥有多个网站
但即使我将其配置为非虚拟主机,它仍然不会在 error_log 和 access_log 中创建用于重写的日志条目。
【问题讨论】:
标签: apache mod-rewrite joomla url-rewriting virtual-hosts