简体   繁体   中英

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. In version 8 this worked without problems with the default 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. We get a lot of "internal redirects with ..." and eventually the webserver crashes because there are too many redirects. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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