I have a PHP web site that has two directories: An application directory and a public directory.
The problem is that the user has to go to http://www.domain.com/public to access the site but I need the user who asks for http://www.domain.com/ to be redirected to http://www.domain.com/public
So my question is what is the best way to do this?
I would do this with a .htaccess rewrite rule. This ensures that the user is always redirected, even if index.php is not requested. Something like this should work for you: