4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: cm on October 18, 2002, 03:16:43 PM
-
Hi,
We recently introduced a sub-domain for our 4 images gallery, which is causing us some problems with broken images.
The normal URL, http://www.eforecourt.com/gallery works fine. However, using http://gallery.eforecourt.com means that the images come up broken.
I've tried changing 'SCRIPT_URL' in constants.php to define('SCRIPT_URL', 'http://gallery.eforecourt.com'); //no trailing slash, but that didn't appear to make any difference.
Any suggestions on how I can get it working with the sub-domain URL?
-
sorry, but this is not a real sub domain, it's just a forwarding url.
have nothing with 4images to do..
try to set:
in SCRIPT_URL:
http://www.eforecourt.com/gallery
-
sorry, but this is not a real sub domain, it's just a forwarding url.
have nothing with 4images to do..
try to set:
in SCRIPT_URL:
http://www.eforecourt.com/gallery
Thansk Nicky for your reply.
Yes, you are right, it is an apache redirect directive that is being used. However, I do think that the problem itself resides with 4images. We've also applied the same principle to phpClassifieds and vBulletin, and both work fine.
The problem as I see it is that 4images references the image location as relative rather than absolute e.g. img src="./data/thumbnails/14/CNV00023_lg.jpg", and that doesn't work in conjunction with the subdomain redirect.
For example, in vBulletin images for the sub-domain are generated as http://forums.eforecourt.com/images, and with normal domain (ie /forums) as http://www.eforecourt.com/forums/images. This all happens automatically by vBulletin itself.
Any suggestions as to hoe this can also be accomplished in 4images?
-
I am so glad that I'm not the only one experiencing this problem! I agree, this situation seems to stem from 4images script. I've done just about everything "cm" has done to resolve the broken images problem on the subdomain URL to my gallery, and with the same results. I hope a future 4images update can fix this bug.
-
It's not a bug. 4images needs to use relative path names to be the most flexible to accomodate the needs of the majority of users.
-
I just tryed to do make 'sub-domain' or 'forwarding url'
I add to my apache config:
<VirtualHost *>
ServerAdmin webmaster@yourdomain.com
ServerName gallery.yourdomain.com
DocumentRoot c:/www/gallery
</VirtualHost>
or redirect URL:
<VirtualHost *>
ServerAdmin webmaster@yourdomain.com
ServerName gallery.yourdomain.com
Redirect / http://www.yourdomain.com/gallery
</VirtualHost>
and it works just perfectly.
or u talking about something else?
-
I'm fairly certain these users don't have access to their Apache config file. Instead they are probably using .htaccess to set this up or possibly even a cgi-bin file.
Sample .htaccess directory forwarding:
Redirect /news http://mydomain.com/stories
Sample cgi-bin subdomain in something like index.cgi:
#!/usr/bin/perl
$url="";
if ($ENV{'HTTP_HOST'} =~ /(www\.|^)mail.mydomain.com/)
{$url = "http://$ENV{'HTTP_HOST'}/cgi-bin/webmail/webmail.pl"}
if ($ENV{'HTTP_HOST'} =~ /(www\.|^)search.mydomain.com/)
{$url = "http://$ENV{'HTTP_HOST'}/search.php"}
if($url eq "") {$url="http://mydomain.com/index.php"}
#################################################################
print "Location: $url\n";
print "Content-Type: text/html\n\n";
print "<HTML><HEAD><TITLE>$ENV{'HTTP_HOST'}</TITLE></HEAD><BODY>\n";
print "<A HREF=\"$url\">Click here to enter</A>\n";
print "</BODY></HTML>\n";
-
have the same problem with subdomians or forwarding
Chris could you explain the httpacces line more detailed.
Ther comes just an errror back form the server.
What iam loking to run
www.Mysite.com/marathon whant to change to marathon.mysite.com
thnak you