0

For testing I hosted my website on free server from 000webhost.com They have a directory structure:-

(root folder) \

(public folder) \public_html

this directory structure enables to keep all the library files in root folder and all public data in \public_html, so I developed my website accordingly, and my final structure looked like:-

/
/include(this folder contains library files)
/logs(log files)
/public_html
/public_html/index.php
/public_html/home.php
/public_html/and other public files

on 000webhost makes only public_folder available to be accessed via url and my url looked neat and clean like www.xample.com/index.php or www.example.com/home.php

but after completion of development I moved website to shared host purchased from go-daddy.com, now they do not have any such kind of directory permission, all the files are kept in root folder and are accessible via url also url has become like:- www.example.com/public_html/home.php or www.example.com/public_html/index.php How should I redirect url request to public_html folder again so as to make library file unavailable to public access and make url neat and clean.

Manish
  • 1,946
  • 2
  • 24
  • 36

1 Answers1

0

Does Godaddy allow you access to Apache?

If so you might be able to modify document root in such a way that the public folder is on the same level as the library and log folders.

Otherwise you will be left in the same situation as many other who use shared hosting and have to protect your folders with .htaccess files.

Ian Lewis
  • 1,311
  • 13
  • 18