Hello, I've been running various flavors of Drupal 7 with Aegir for over 1 year now. I've had my share of issues to work out with either the excellent Aegir documentation, or Googling. One thing I have not been able to understand is the Apache Files Rewrite rules outlined here - http://community.aegirproject.org/node/43 It seems this documentation needs updating as the last paragraph states "Fortunately, it's expected that Drupal 7 will improve this sort of thing altogether and things will hopefully become easier.", and D7 has been out for a long time now.
I'm using Aegir 1.9, and my Files Rewrite rules don't work, and have never worked as far as I can tell. I've installed Aegir with the Debian packages. I use my local Aegir virtual machine as the main development box, then I push the websites out to various remote servers when they are ready for production.
As a simple test - if a file lives at /var/www/sites/mysite/files/my_file.jpg
Shouldn't I be able to go directly to www.mysiteontheinterwebs.com/files/myfile.jpg? Even if that's not the case for a direct link - shouldn't the page source HTML still show www.mysiteontheinterwebs.com/files/myfile.jpg?
Please help me understand why the Files Rewrite rules are not working... all of my sites are on D7, are the Rewrite rules only valid for D6? Any insight is very much appreciated as this is something I've just not been able to grok on my own after several months of trying... made even worse by the fact that I've been kicking LAMP servers around since PHP3 and Apache 1.3.4 :(.... Is there an Aegir module I need to download & install? What am I missing here? Thank you for your time.
Thank you,
--Tony
Comments
Comment #1
helmo commentedDon't you mean: /var/aegir/platforms/somedrupal7platform/sites/www.mysiteontheinterwebs.com/files/myfile.jpg
The rewrite rules work for me. In this case http://www.mysiteontheinterwebs.com/files/myfile.jpg would be internally redirected to http://www.mysiteontheinterwebs.com/sites/www.mysiteontheinterwebs.com/f...
Which url ends up in the html source is not up to Aegir, that's something your image/wysiwyg module handles.
Comment #2
rowbotony commentedHi, thanks for the reply, yes the correct URL for my Aegir example is
/var/aegir/platforms/somedrupal7platform/sites/www.mysiteontheinterwebs.com/files/myfile.jpg.Long story short - I did some tests on a D6 site today and found ReWrite worked fine. Ultimately I figured out that the issue is ReWrite is not working on ALIASES of the site. My site is:
/var/aegir/platforms/somedrupal7platform/sites/example.com(I don't use the www prefix)The link to:
http://example.com/files/myfile.jpgworks fine I just learned today, however the link to WWW doesn't work:http://www.example.com/files/myfile.jpgSo, this great mystery has finally been solved for me :). That's why I tagged this as support and not a bug - because I knew there must have been something I was misunderstanding in all of this. I appreciate you taking the time to help me. I don't use WYSIWYG editors - I code the HTML by hand and was always entering the www, maybe I'd have caught this sooner if I had used a WYSIWYG editor... no matter... maybe I'd be better off with www.mysite.com, then just mysite.com moving forward. Thank you again for the reply!
--Tony
Comment #3
rowbotony commentedclosing the issue, thanks!