I uploaded my file oustside the root directory while leaving
only index.php in the public_html
here is my directory structure
/home/user
/myweb_application ----> my uploaded files
/access_log
/etc
/mail
/public_htm
/public_ftp
/tmp
/www
Here is how i configured it
1: inside /public_html I have index.php with the content as follow
PHP Code:
<?php
require '../myweb_application/web_index.php';
?>
2: Inside /myweb_application i created 2 files for testing along with web_index.php making it 3 php files
web_index.php
HTML Code:
<html><body>
<li> <a href="test1.php">Connect test1</a><br><br>
</li>
<li> <a href="test2.php">Connect test2</a><br><br>
</li>
</ul>
</body></html>
test1.php
HTML Code:
<html>
I am test 1
</html>
test2.php
HTML Code:
<html>
I am test 2
</html>
Finally, the directory becomes
/home/user
/myweb_application ----> my uploaded files
web_index.php
test1.php
test2.php
/access_log
/etc
/mail
/public_htm
index.php
/public_ftp
/tmp
/www
when i load the page as http://example.com
index.php loads web_index.php from outside the root
Look at my problem now
when i click on link CONNECT TEST1 of test1.php from web_index.php it says
The requested URL /test1.php was not found on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
what could be the problem. Is it because test1.php and test2.php is outside the public_html what about web_index. php that is working. Can someone help to fix that
thank you
Bookmarks