I am new to htaccess and have some problems for which I need help. On my site I have a folder (actually empty) for which I want to serve content from the root folder.
Suppose the structure is as follows:
example.com
-folder1 -index.php -anotherpage.php -.htaccess
So, when someone goes to example.com/folder1/index.php, he will see the URL, but get the content from example.com/index.php. If he visits example.com/folder1/anotherpage.php, he will receive content from example.com/anotherpage.php. Of course, when he visits directly at example.com/index.php, he will see example.com/index.php.
I found many examples that show the opposite, but not the way I want. Also, to clarify, I want to rewrite rather than redirect, so that the URL will falsify that there are actually pages in folder1.
Any help would be appreciated.
source share