0

Heloo Guyz!! I Uploaded My Html and Php Files To server by using FileZila. And When I google and click my address It shows all the Files i uploaded to server(Shows the directory ). not the home page, how can i show my home page only when i click my address please help me?????????

3
Contributors
5
Replies
30
Views
4 Years
Discussion Span
Last Post by irfath
0

The web site configuration is going to have something related to "default files" (depends on the web server and the admin tool you are using). In any case, the point is that when you type in your URL such as domain.com, the web server needs to know which file to serve since you did not specify one such as domain.com/index.php. So you need to configure your site and tell it which default file to load when no file is explicitly requested.

The reason why you see a listing of your directory is because you most likey have "directory browsing" enabled. You may want to disable that feature. In the event that its disabled, the web server will then just return a 404 (page not found) error instead of sending back the directory listing.

3

Log into your hosting account panel (please excuse the general terms as it depends on what you are using to manage your web hosting account) and look for two items...

Something related to "documents" or "default pages", etc... Then, make sure in that list of documents, you have in order the names of the files that you want the web server to load. For example, if your home page is default.php, and you plan on having this file name say in every folder, then make sure that you have default.php listed as the first item. Or, you can add default.htm, default.html, index.htm, etc... The list depends on you.

Secondly, look for directory browsing... disable that feature.

If you run into issues, these two items could be quickly addressed by contacting your hosting provider's support.

2

As JorgeM said, but some hosts don't have specific settings to change. You can add a file called .htaccess that contains the following:

# Defauly homepage order.
DirectoryIndex index.php index.html

# Prevent directory listing.
Options All -Indexes

This first part of this file will try to load index.php by default, if it doesn't find that it will try to load index.html. You can add to (or change) this order if you like.
The second part restricts directory listing.

The .htaccess file can be a little tricky to create as it doesn't have a name, just an extension. A quick search should get you more details on what .htaccess can do.

0

Awesome Mr: Zagga It Really Worked Thanks Once Again!!!! :)
And Mr:JorgeM Thaks For Helping Really Apperciate It

This question has already been answered. 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.