I did a local install of Wordpress by unzipping the install files into MAMP/htdocs/subdirectory and then successfully completing the installation. There is a complete website in MAMP/htdocs/ (which doesn't use WordPress). When I try to access localhost:8888/subdirectory, I'm getting a 403 error. I found the cause which is a line in MAMP/htdocs/.htaccess:
DirectoryIndex src/index.php
When I remove this line, the problem is resolved, but, of course, I need this line for the main website to function properly. Is there a workaround to get WordPress working in the subdirectory (maybe by editing the default .htaccess that was installed by WordPress in MAMP/htdocs/subdirectory/.htaccess?)
Post your
.htaccess
code or you can try the below.htaccess
code just the change the sub directory to the folder name