This is my directory structure:
Public_html
/app
/bootstrap
/config
/database
/public
/resources
/routes
/vendor
/storage
/another-sctipt
I'm trying to use Laravel application alongside /another-sctipt (wordpress in my case) and remove /public from Laravel URLs.
The problem is when I use a simple .htaccess file to remove public, it shows 404 for /another-sctipt directory.
Now the only way I can do is https://stackoverflow.com/a/28735930/6934036.
But it's not a secure way because it exposes .env file (mentioned in comments).
Is this really unsecure way even if I change my .env file permission to 600?
And is there a better way to achieve this?
notes:
I can't change webserver configs.