So, this is somewhat of a strange situation. I’m hosting a development server for a person I’m working with in a subfolder of my website. Basically the file structure looks like this:
public_html/my_subfolder/public/index.php
So what I’m attempting to do is make it so that if a user types “www.mysite.com/my_subfolder” they are taken to the “public/index.php” page without the public subfolder appearing in the URL. It’s kind of silly that I’m still messing with this, considering it’s only a development server.
I’m just at the point where I’ve messed with it for so long I really want to get it to work now, so that, if nothing else, I’ll learn something. Any help would be greatly appreciated!
Try this rule in your .htaccess file:
This will redirect everything so make sure to serve your static files like js, css, images etc from
my_subfolder/publicas well.