Is there a way to make .htaccess tell a folder to act as the lowest level? What I mean is this, say you have a folder like so:
/about/ /contact/ /css/ /images/ .htaccess index.php header.php
If they are at /contact/index.php, then if I have <a href="../index.php">Home</a> to go to the home page, it works all fine, but if they are on the actual main page, it will try to go a directory lower.
The reason is because Im trying to test sites in sub-folders.
The directly answer your question, the answer is no. By the time, .htaccess is read, the path was already translated to a directory.
If you want to change the root, you have to do it in httpd.conf (or rewrite all the requests in the root to the destination directory). If you want to have several roots (under different domains), you have to use virtual hosts (again, only in httpd.conf).
You can also make your site work when it's not in the root directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With