我们当前正在尝试通过include将TYPO3 v9的默认htaccess文件加载到我们的apache服务器中,而不是将其放入文档根目录中。在版本8中,默认htaccess可以正常工作。如果我们从
获取模板文件typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess
它可以在文档根目录下运行,但不能包含在vhost中。我们得到了很多“带有...的内部重定向”,最终由于太多的重定向,导致Web服务器崩溃。有人遇到过问题吗?
我们随附
<Directory "/var/www/vhosts/xxx/">
Require all granted
Options -Indexes +FollowSymLinks
Include /etc/httpd/root-htaccess
AllowOverride all </Directory>
还有一些日志文件:
...
[Fri Feb 22 13:05:17.4446xxx 2019] [rewrite:trace1] [pid 27130] mod_rewrite.c(470): [client xxx.xxx.xxx.xxx:58029] xxx.xxx.xxx.xxx - - [xxx.xxx.local/sid#55869c6xxx540][rid#55869c886380/initial] [perdir /var/www/vhosts/xxx/] internal redirect with /var/www/vhosts/xxx/index.php [INTERNAL REDIRECT]
[Fri Feb 22 13:05:17.446123 2019] [rewrite:trace1] [pid 27130] mod_rewrite.c(470): [client xxx.xxx.xxx.xxx:58029] xxx.xxx.xxx.xxx - - [xxx.xxx.local/sid#55869c6xxx540][rid#55869c88bc70/initial/redir#1] [perdir /var/www/vhosts/xxx/] internal redirect with /var/www/vhosts/xxx/index.php [INTERNAL REDIRECT]
[Fri Feb 22 13:05:17.447188 2019] [rewrite:trace1] [pid 27130] mod_rewrite.c(470): [client xxx.xxx.xxx.xxx:58029] xxx.xxx.xxx.xxx - - [xxx.xxx.local/sid#55869c6xxx540][rid#55869c892908/initial/redir#2] [perdir /var/www/vhosts/xxx/] internal redirect with /var/www/vhosts/xxx/index.php [INTERNAL REDIRECT]
[Fri Feb 22 13:05:17.448299 2019] [rewrite:trace1] [pid 27130] mod_rewrite.c(470): [client xxx.xxx.xxx.xxx:58029] xxx.xxx.xxx.xxx - - [xxx.xxx.local/sid#55869c6xxx540][rid#55869c897968/initial/redir#3] [perdir /var/www/vhosts/xxx/] internal redirect with /var/www/vhosts/xxx/index.php [INTERNAL REDIRECT]
[Fri Feb 22 13:05:17.449325 2019] [rewrite:trace1] [pid 27130] mod_rewrite.c(470): [client xxx.xxx.xxx.xxx:58029] xxx.xxx.xxx.xxx - - [xxx.xxx.local/sid#55869c6xxx540][rid#55869c89d108/initial/redir#4] [perdir /var/www/vhosts/xxx/] internal redirect with /var/www/vhosts/xxx/index.php [INTERNAL REDIRECT]
[Fri Feb 22 13:05:17.450570 2019] [rewrite:trace1] [pid 27130] mod_rewrite.c(470): [client xxx.xxx.xxx.xxx:58029] xxx.xxx.xxx.xxx - - [xxx.xxx.local/sid#55869c6xxx540][rid#55869c8a3238/initial/redir#5] [perdir /var/www/vhosts/xxx/] internal redirect with /var/www/vhosts/xxx/index.php [INTERNAL REDIRECT]
...
感谢您的帮助或提示。
答案 0 :(得分:0)
我们解决了这个问题。
刚刚设置
Rewritebase /
在<directory>
部分的虚拟主机文件中。