0

Hello i have index.php file in root directory redirecting to a page.
It's working perfect on my localhost but not the webserver.
Also link to the root folder on the webserver lists files excluding the index.php
Please i need help with this

6
Contributors
11
Replies
49
Views
4 Years
Discussion Span
Last Post by capton
0

the problem is when I type the url to the root folder of the website it shows a list of files in the folder and i dont want that so i placed this code in the index.php

<?php
header("Location:myMainHomepage.php");
?>
0

Have you tried adding a space after the colon? If that does not work either, try a fully qualified URL.

Edited by pritaeas

0

Tried both but still not working.
However it works on my localhost and even the index.php file doesn't show up in the root directory on the webserver.

0

So, you're saying that http://www.example.com/index.php (your domain of course) when entered into the browser address bar, fails to show?

yeah, it fails to show up.
And browser shows the error : The resource requested could not be found on this server!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.