vrijdag 12 augustus 2011

Avoiding the iWeb Sitename in the URL

Read this first :

    The concept of iWeb Sites

And then this :

    Avoiding the iWeb Sitename in the URL

It works with every webhost I use. Here's another example :

    http://wyodor.byethost8.com/htdocs

Following the instructions by the webhoster, htdocs is the folder where webpages should be published. In iWeb it should be used as the pathname.

I named the iWeb site htdocs and published the site OUTSIDE the htdocs folder on the server by leaving the pathname empty. Against the instructions as can clearly be seen on the image.

iWeb doesn't care, but expects the URL to be :

    http://wyodor.byethost8.com/htdocs

It uses this URL to create the subscription and RSS feed links.

By using an .htaccess file with the right directives I avoid the sitename in the URL, keep iWeb happily ignorant about it, and still make it work.

And here's a solution to solve the conflict between the index.html file other applications create and the one iWeb creates outside the folder with the Sitename.

In Sandvox for example, open the project that's default on the server, i.e. The page that loads first.

Then click the Homepage and choose index.php from the popup menu at the bottom of the window :

To make sure that this page opens, you have to test what the server does when you type your domainname without a pagename.

Ideally the index.php should open, if not, it will open the index.html file that redirects to your iWeb site.

Here's a test page :

    http://wyodor.byethost8.com/whatfirst/

A php file opens.

If on your server the index.html file opens, you have to add the directive to a .htaccess file as shown on the php page. If you change the order of the files in the directive, the index.html file will open.