I’d like to know if it is possible to do this:
To keep the root clean of all files, I want to put everything under a sub-directory (index.php, .htaccess,…). Is it possible to configure a rule in .htaccess which resides in this sub-directory to redirect from root directory to index.php which also resides in the sub-directory ?
Then what would be the syntax for .htaccess ?
A
.htaccessfile has effect only in/on :So, no, you cannot have a
.htaccessin a directory, that will impact what’s in it’s parent directory : Apache will not even see that.htaccessfile.If you want something like that, you’ll have to put it at a higher-level ; either :
.htaccessfile in the parent-directory (which you don’t want to do, it seems)