Score:1

Redirect docroot for specific URI path by .htacess

um flag

Is it possible to redirect a specific URI path to a specific docroot within the original docroot using the .htaccess?

For example:

example.com > docroot 

Where

example.com/path > docroot/subdir
kz flag
Sorry, really not sure what you are getting at here? What problem are you trying to solve? Describe in natural language what it is you are trying to do and what your current config consists of.
David Spector avatar
cn flag
I think I understand the question, and have the same one myself. One example problem is that ErrorDocument requires a docroot-relative pathname for an error handler, like "/error.php". Being able to change the doc root to the subdirctory in which the htaccess file exists would make "/error.php" refer to an "error.php" located in the same directory as .htacess instead of one located in the document root. I suspect that the answer is "NO", that this is another limitation of the Apache directives: the doc root is a constant.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.