ahoy all,
i am trying to install Grav into a “grav” subdirectory of the web server’s root “public_html” (i.e. /public_html/grav/) but have Grav working as if it is indeed in the root folder. the end goal is to have Grav transparently serving from the root folder of the domain.xyz while located in its subdirectory.
thus to achieve this i have:
-
installed Grav into its own “grav” folder
-
created the following .htaccess file
RewriteEngine on
RewriteBase /#- transparently redirect all request to this directory to a subdirectory
#- based on https://help.dreamhost.com/hc/en-us/articles/216109967-Transparently-redirect-your-root-directory-to-a-subdirectory#-# Rewrites all URLS without subdirectory in them
RewriteCond %{REQUEST_URI} !^/grav/#-# Rewrite all those to insert /folder
RewriteRule ^(.*)$ /grav/$1 [L] -
changed the “custom_base_url” to the domain with no subdirectory as suggested here
while i do end up with Grav transparently serving from the root folder, i can no longer access the admin panel: i can reach it at domain.xyz/admin but logging in just returns me to the same page.
since this is usually done entirely with htaccess magic, is there something Grav specific that i am missing?
thanks, w