How to stop iWeb putting your site in a subfolder

General Interest, Technical Info Add comments

First of all, feel free to skip to the end for the solution. Please leave a comment if this helped you in any way (or not).

My Dad recently bought a Mac and designed a website in iWeb. When it came to publish the site I configured it and hit “publish”. Up popped a message telling me that the site was now live at “<sitename>.com/site”. Mmm I thought, I must have made a mistake when configuring it. I went back and checked the settings and found in actual fact this is “just the way it works”

Rubbish!

I Googled the situation and found that using the only way people were getting around this issue was to upload their website in an FTP client like Cyberduck. All well and good, but hardly the most tidy solution.

I decided to go about this a different way, by telling the server that instead of looking in the “www” folder as the root of the site, it should instead look inside the “site” folder.

This was achieved by creating a “.htaccess” file inside “www” (or “public_html” as it may be). You need to edit the next bit to fit your site, but you get the idea:

RewriteEngine on
#
RewriteCond %{HTTP_HOST} yoursite\.com [NC]
RewriteCond %{REQUEST_URI} !/site
RewriteRule (.*) /site/$1 [L]

Note: make sure you keep the slashes the way they are, they look odd but they are needed.
This simply tells the server to look inside the iWeb created folder whenever anyone goes to your site. Set this up once and you should be able to forget about it from then on, it just works.

I hope this helps people resolve an issue that really should not be there in the first place. Please leave a comment with your thoughts.

Stumble it!

4 Responses to “How to stop iWeb putting your site in a subfolder”

  1. Matt Says:

    yay that’s exactly what I was looking for to resolve a different problem :D

  2. Apple’s iWeb great for beginners, not so good for others | Magicspan Says:

    [...] to this site for the information.] Of course, substitute your sites name in place of “yoursite” and [...]

  3. Simon Says:

    Hi

    I wonder if you could help by explaining this a little further to a non-techy like me?

    I have my iweb site content uploaded straight into the directory root on my server (so no site folder). So my urls are created as such: http://www.site.co.uk/page.htm

    However, my problem is that iweb wants to put the site name in the url of my rss feeds. So although my blog page is http://www.site.co.uk/blog.html iweb wants to create http://www.site.co.uk/sitename/blog.html. Therefore the rss links don’t work.

    Is there a way of putting a .htaccess file into the root of my server to tell iweb not to create rss urls with the site name? You’ll have to forgive me as this is the first time I’ve come across .htaccess and not sure how to create one

    Thanks, Simon

  4. VertigoRay Says:

    Well done. I didn’t want to hash it out myself so I did a quick Google and you saved me the time. Thanks!

    Simon. Put the .htaccess file in the root of your directory and you’ll see that it magically reworks everything for you.

    Hers’s my brother’s site that I applied this .htaccess to:
    Pretty Domain: http://ribbonsforvets.com
    Ugly iWeb Path: http://ribbonsforvets.com/Ribbons_For_Vets

    iWeb actually publishes to the “Ugly iWeb Path”, but thanks to this simple fix, you’d never be able to tell.

    Cheers!

Leave a Reply