tags:

views:

44

answers:

3

I wonder if the index.html MUST be in the "www" folder on the server after uploading the site?

This because I have actually made everything in a folder called "SV", so my site is located in : "www/SV/index.html"

My Q is, on the server, could I just create a folder named "SV" under "www" and expect index.html to be automatically displayed ones the users type in the web-adress to my site?

Thanks

A: 

In general, any directory may be assigned as the web-root.

But in your particular case of shared web-hosting I doubt you can have access tho the server config to do it.

Though there can be some tricks done, using PHP or mod_rewrite. With more certain question describing background, you can get more certain answer.

Col. Shrapnel
+1  A: 

You should configure your web server so that the document root points to the path where your index.html is located

Riccardo Galli
+2  A: 

well, if they went to www.yoursite.com/SV then it would display. If you don't want that, you have a few options:

  1. Put an "index.php" file in the "www" directory and have it redirect to the one in the /SV folder.

  2. Change the apache configuration to tell it the site is located in the /SV directory.

  3. Use mod_rewrite rules in your .htaccess file to rewrite URLs so they go to the /SV directory.

But my first question would be why don't you just put it in the "www" directory?

Eric Petroelje
ok, I have a VPS so I have root access. What lines in apache.conf (or do you mean httpd.conf) should I change?
Camran
@Camran - the setting to change would be the `DocumentRoot` for your `VirtualHost` entry in the httpd.conf file.
Eric Petroelje