Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

www and no www bug

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Author Message
davepc

Beginner
Beginner


Joined: Jul 04, 2005
Posts: 10

PostPosted: Tue Jul 19, 2005 9:01 am    Post subject: www and no www bug Reply with quote

Hey,
Thanks for this integration tool, its cool.

Not sure if you know about this bug, but have you noticed how images and style sheets dont get address proper when you try your address with or without the www.

I see the bug is on your example too:

http://www.nukedgallery.net/modules.php?name=gallery2
http://nukedgallery.net/modules.php?name=gallery2

its possible to get it to work without the www by changing settings in gallery2.cfg, but then it stops workin with the www.
but is there a workaround to get it to work for both?

Thanks
Dave
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: www and no www bug  

Back to top
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6274
Location: Washington Township, NJ, USA

PostPosted: Tue Jul 19, 2005 4:54 pm    Post subject: Re: www and no www bug Reply with quote

sharp eyes Smile

i know why this is happening, now i just have to figure out how to solve it Smile
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
davepc

Beginner
Beginner


Joined: Jul 04, 2005
Posts: 10

PostPosted: Wed Jul 20, 2005 5:21 am    Post subject: Re: www and no www bug Reply with quote

my short term fix for this is to refresh everyone who goes to the site without the www onto the www site.

/includes/meta.php
just below
Code: ›  
##################################################
# Include for Meta Tags generation               #
##################################################

put in:
Code: ›
$adddress=  $_SERVER['HTTP_HOST'];
if ($adddress == "my_domain.net")   /* Note without the www. */
{
$url_re = "http://www.my_domain.net".$_SERVER['REQUEST_URI'];
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=".$url_re."\">\n";
}


Not a proper fix for your problem, but might help some people in the mean time.
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6274
Location: Washington Township, NJ, USA

PostPosted: Wed Jul 20, 2005 4:10 pm    Post subject: Re: www and no www bug Reply with quote

nah, fixed it. it was a bug w/ the "embedURI". if you included the domain name, ie:
http://www.foo.com/modules.php?name=gallery2

in the embedURI directive, you got the bug you see. If, however, you just make it:
modules.php?name=gallery2

it works for both Smile
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
davepc

Beginner
Beginner


Joined: Jul 04, 2005
Posts: 10

PostPosted: Thu Jul 21, 2005 6:53 am    Post subject: Re: www and no www bug Reply with quote

ye, nice on.

works for me too.
Thanks
Dave
Back to top
Offline View user's profile Send private message
Crypton

Novice
Novice


Joined: Sep 28, 2004
Posts: 29

PostPosted: Thu Jul 21, 2005 7:32 am    Post subject: Re: www and no www bug Reply with quote

nice catch Smile

btw, you mentioned a workaround until it was fixed (of course it was fixed already)

but..

If your server has mod_rewrite enabled, which most supporting nuke do,

you can add these lines in .htaccess file to force the link to be replaced with www. (Of course replacing yourdomain with your real domain name.

Code: ›
RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]


Basically what will happen is if a user enters in http://yourdomain.com mod_rewrite will kick in and force it to be http://www.yourdomain.com

just posted for future reference in case someone searches for a similar problem with other modules/blocks ect..
Back to top
Hidden View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Gallery 2 Integration View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSearch Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaSEO

6th year online! 2003-2008
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia