so a cpanel backup was imported and it has a WordPress website that lives in a subfolder, like:
public_html/wp27/ (name has been altered)
It worked fine on the cpanel server but fails to redirect requests and produces 403 because of not having a valid index page in the root folder, apparently.
Gemini suggests there is a catch22 of apache and/or nginx expecting an index at public_html and stopping when it doesn’t find one before processing the .htaccess
But if I put a dummy index.php or w/e at public_html, then that satisfies the first check in .htaccess for index.php and doesn’t process the lower part that would redirect to the subfolder.
I’m not sure how it worked correctly in cPanel but fails to work here. Anyone know what is going on and how to resolve? I’d like it to work as before and not expose the subfolder name in the URL either. Thank you!
DirectoryIndex index.php index.htm index.html
Options -Indexes +FollowSymLinks
BEGIN WordPress
The directives (lines) between “BEGIN WordPress” and “END WordPress” are
dynamically generated, and should only be modified via WordPress filters.
Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
SetEnv MOD_REWRITE_ON Yes
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp27/index.php [L]
</IfModule>
END WordPress
