Typo3 backend login throw 404

Hello. I tried to install Typo3 in subdirectory /typo3, but after login to admin panel I got “404 page not found” error. The problem does not occur when installing Typo3 in root directory. It’s probably related with htaccess rules. Is there any solution?

domain.com/typo3/typo3/login ← returns not found after submit login
domain.com/typo3/login ← everything works

Hi Thomas!

Welcome to TYPO3!

Yes, I wonder if using typo3/ in your path is messing up something. Do you have the same problem if you give the directory a different name?

Also: Which version of TYPO3 are you using?

I wonder if it’s this RewriteRule that is triggered:

— Mathias

Yes, same problem for different directory name.
I use typo3 12.4.14

See if it helps if you set RewriteBase /typo3/ in your .htaccess file.

— Mathias

Where in the .htaccess file should that be added?
I am having the same problem with a TYPO3 v13 installation in a subfolder, for now adding that in the places where I’d have suggested did not work.

And actually my typo3 installation is in /var/www/html/typo3.
The domain typo3.xxx.yy points directly to the typo3/public.

So in difference to the beginning statement it is not behind a subfolder.

The request to typo3.xxx.yy/typo3/login?loginProvider… gets a 404 as response