Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iweb ftp problem....

so I have a website in the root folder of my hosting account. I also have a different website in a folder in my root. Problem is when I upload from iweb to the website in the folder, it creates a new folder with that websites name within the folder. so when my customers go to the website they see www.sitename.com/sitename. So I thought if I delete the first folder and tell iweb just to pubish to the root, it will create just one folder. BUT, iweb also creates an index file outside of the folder. So if I have a different website in the root already, the new index file will mess with that....won't it?

Posted on Mar 5, 2014 11:55 PM

Reply
3 replies

Mar 6, 2014 1:15 PM in response to thedigitalcurrent

Let's see if we can solve the problem.


To prevent the current index.html file from being overwritten when you add a site you have to teach the server some tricks.


First, add a htaccess file to the root of the server with this code:


<IfModule dir_module>

DirectoryIndex index.php index.html

</IfModule>


https://my.justhost.com/cgi/help/htaccess


Put the file on the server first and rename it .htaccess


Notice the . before the name, that makes the file invisible.


Then change your current index.html to index.php


When you add a new site, a new index.html file is created that redirects to your new site.


But it is ignored when you type :


www.domainname.com


When you change the default webpage of your current Site, iWeb creates a new index.html file.


Nothing wrong with that but you will not see you default webpage.


You have to edit the index.php file and change the pagename.


To make it easier to read, replace the current html code with :


<?php

header('location: Welcome.html');

?>


where Welcome.html should be the default webpage you now use.


Added advantage is that the default webpage loads immediately.

iweb ftp problem....

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.