Broken image with "WWW" in URL, but works when left out of url... HELP

jblambertson

Joined: 2008-06-03
Posts: 1
Posted: Wed, 2008-06-04 03:05

I'm experiencing broken images in my Joomla page view of G2, when I use the WWW extenstion in my URL (example: http://www.mysitename.com/gallery). However, when I exclude the www extension (i.e. http://mysitename.com/gallery), the images appear perfectly! I'm guessing that there is some obvious setting to resolve, but don't know where to look... Any suggestions?

Last Run Details:

Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.6 cgi-fcgi
Webserver = Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8g DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysqlt 5.0.45-community-log, lock.system=flock
Toolkits = ArchiveUpload, Dcraw, Exif, Getid3, LinkItemToolkit, Thumbnail, Gd, ImageMagick, NetPBM
Acceleration = none, none
Operating system = Linux box439.bluehost.com 2.6.22-9_3.BHsmp #1 SMP Wed May 21 12:20:26 MDT 2008 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; MS-RTC LM 8; InfoPath.2; WWTClient2)
Rows in GalleryAccessMap table = 22
Rows in GalleryAccessSubscriberMap table = 6
Rows in GalleryUser table = 6
Rows in GalleryItem table = 4
Rows in GalleryAlbumItem table = 2
Rows in GalleryCacheMap table = 0

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-06-04 07:47

In general Gallery's only really intended to use one hostname - either with, or without www (strictly they should resolve to different webservers, it's slack 'default' DNS configs by ISPs that give people cause to assume they're supposed to be the same thing). Mixing hostnames can confuse the url-rewrite module (try with it disabled then renenabling it if you're using it) and also there can be problems with credentials (cookies that point to your sessionId will be valid for one hostname but not the other). That's aside from any Joomla/Gallery interation problems arising from two hostnames.

Another way around the problem is to set up your DNS so that the form you don't want to use is given it a CNAME record pointing to the one you do.