I spent several hours today researching this and I can't seem to find a definitive answer whether this is possible. I use Apache and I have Grav installed in a subfolder of webroot (/public_html/grav). I can access the Grav pages fine by going to www.mysite.com/grav/mypage. However, I would like to access the Grav pages by going to www.mysite.com/mypage.
Installing Grav into the webroot directly is not an option unfortunately due to a picky client who doesn't want to mix his non-CMS based HTML files with the Grav files. He also doesn't want to do a redirect from /mypage to /grav/mypage, but rather an internal rewrite that is invisible to the user.
I tried doing a simple rewrite rule in the htaccess file located in webroot, but I get Grav 404 errors that way. My rewrite rule looks like this: RewriteRule ^mypage/?$ /grav/index.php [NC,L]. I imagine Grav can't figure out what page I'm trying to access, because the URL it gets doesn't include the directory in which it's installed.
I also played around with the setup.php file and tried to adapt the multisite setup for m y purpose, but I couldn't get it working that way either.
Any ideas? Is this even possible to do?
Thank you for your help!
Gabe