iWeb, multiple sites and rss
iWeb, multiple sites and rss
2007
I dont have a .Mac account, but I like iWeb. I am trying to use it to manage my website here via the “Publish To Folder” option and that is working pretty good. It makes strange links though, when I ftp the folder I publish to up to my server instead of just saying http://sentman.com/index.html I get something that looks like:
And if you create multiple sites they want to go under the second sentman.com instead of just their own directory. On my hosting service they create a separate set of directories for each virtual domain I create and you dont get to mess with the low level apache settings to do something like a clever re-write or some other hacking to make it look right. Which is probably good... The initial solution I tried was to copy the second sentman.com folder to the webroot on the server instead of the folder that I published to. This looked good except for all the rss links are now broken as iWeb wants to create all the links based off the address you put in their site name for rss field when you select publish to folder.
The situation gets even wierder when you want to have multiple sites. Maybe I just dont see how to use the program, but as far as I can tell this makes it broken for more than one site unless it’s really just like a folder under the first site. I need to have several “sites” in iWeb all uploading to different directories on the server, not all to the same place! So I can ftp the individual site folders from inside the “publish to folder” folder, and that works for everything except for rss feed information which then has really strange links like:
http://sentman.com/myothersite.com/blog/feed.rss
when it should just be
http://myothersite.com/blog/feed.rss
but you can’t make it do that as far as I can see. So what I needed was a little app to walk all the html and xml files that iWeb creates after I publish to folder, but before I upload to fix all the links. iWeb RSS Fixer is the result. After the Publish To Folder step, drag and drop that folder form the finder onto iWeb RSS Fixer and it will fix those links. Here’s exactly what it does:
First it needs to know what the name of the root site is and it gets that by looking into the first index.html file that is created in the Publish to Folder folder. That page contains nothing but a meta refresh to the full url and so contains the same name that you used in the link for rss feed field. After pulling that out and walking the rest of the individual site folders it can build the link that needs to be changed. So in my case everytime it finds:
sentman.com/ sentman.com
in a link, it will replace it with just sentman.com
and everytime it finds something like
sentman.com/mysecondsite.com it will replace it with just mysecondsite.com fixing any of the rss links.
In my testing here it SEEMS to be working fine and I dont believe that it can do any irreparable damage to your site as it works only on the publish to folder folder and not on the iWeb document. So if it completely hoses up your site, just republish again and upload again and everything it did will disappear.
Make sure that you only ever drag and drop the folder that was created by the “publish to folder” command onto the app. The program makes no attempt to validate the folder and doesn’t give you a second chance to make sure you dragged the right folder so get it right the first time or it may do unfortunate things to other documents.
So just to sum up then: It is possible to manage multiple separate sites from iWeb, but it requires an extra step.
As of iWeb 08 (2.0.1) and (2.0.2) it creates a folder structure like this:
site root/
index.html
sentman.com/
site 2/
site 3/
site 4/
The “site root” is the folder that you selected when you told iWeb to “publish to folder”.
Drag the “site root” folder onto iWeb RSS Fixer and it will fix the links inside the site folders. Then upload each individual site folder (in this example “sentman.com”, “site 2”, “site 3” etc to the appropriate virtual host folder on your server, whatever that may be and all the rss links should be working fine.
iWeb RSS Fixer is released as freeware but I retain the copyright so it’s free for your personal or professional use as long as you do not resell or redistribute the application yourself. As with all freeware it is released without any official guarantee or support and you are put on notice that it does make changes to the files you drag onto it. It has been tested only with iWeb version 2.0.1 and 2.0.2 and may make a horrible mess out of sites created with earlier or later versions.
Also, I am not an apache config guru, if you do not already have a working knowledge of virtual hosts and know how to create them and move your data up to them then I cannot help you. I have no idea how to add this to the apache config file manually or anything else of the sort.
DOWNLOAD iwebrssfix.zip (version 1.0.1 universal MacOS App, 2.5meg)
UPDATE: 9/28/07 - In order to make it a little safer if you were to drop the wrong folder onto the app if it doesn’t find the root folder reference it will stop and not try to continue and so will alter no files.
If you can see the link of this page, and sentman.com is shown only once, then it’s working ;) Even though it’s freeware, I’d still love to hear from people using it or if you have any questions or comments about it. Thank you!
Like the program? Donate $5!
iWeb RSS Fixer
9/27/07
Freeware app to make using iWeb to manage multiple separate sites a little easier.