简体   繁体   English

TYPO3 9:默认htaccess文件无法像Apache Web服务器的vhost中的include一样工作

[英]TYPO3 9: Default htaccess-file not working as include in vhost of apache webserver

we are currently trying to load the default htaccess file of TYPO3 v9 into our apache servers via include instead of putting it into the document roots. 我们目前正在尝试通过include将TYPO3 v9的默认htaccess文件加载到我们的apache服务器中,而不是将其放入文档根目录中。 In version 8 this worked without problems with the default htaccess. 在版本8中,默认htaccess可以正常工作。 If we take the template file from the 如果我们从

typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess

it works in the document root but not as include in the vhost. 它可以在文档根目录下运行,但不能在vhost中包含。 We get a lot of "internal redirects with ..." and eventually the webserver crashes because there are too many redirects. 我们得到了很多“带有...的内部重定向”,最终由于太多的重定向,导致Web服务器崩溃。 Has anyone ever had the problem? 有人遇到过问题吗?

We include with 我们包括

<Directory "/var/www/vhosts/xxx/">
Require all granted
Options -Indexes +FollowSymLinks

Include /etc/httpd/root-htaccess
AllowOverride all </Directory>

And here some of the log-file: 这里是一些日志文件:

...
[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]
...

Thanks for any help or hints. 感谢您的帮助或提示。

We solved the issue. 我们解决了这个问题。

just set 刚设置

Rewritebase /

in your vhost-file in the <directory> part. <directory>部分的vhost文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM