Adding "www" to the base URL of my gallery

blacksburgpoker

Joined: 2005-11-26
Posts: 108
Posted: Thu, 2006-11-16 03:01

I've installed my gallery for a while now.

However, I want to make the URLs the same across the website.

Apparently I chose the URL to be

http://yourdomain.com/,

However, I want it to be
http://www.yourdomain.com/

Anyone knows how that can be done?

Thanks alot

==================================
Website Design and SEO | Poker Picture Gallery | Free Desktop Wallpapers

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Thu, 2006-11-16 05:12

is it showing up incorectly in your address bar as you go through the site or is it showing incorrectly on the site itself, like on the album tree?

just guessing here...

Do you have anything in this area of your config.php

/*
* This setting can be used to override Gallery's auto-detection of the domain-name,
* protocol (http/https), URL path, and of the file & query string.
* Most users can leave this empty. If the server is misconfigured or for very special
* setups, this setting can be quite handy.
* Examples (the positions of the slashes ('/') are important):
* override the path: $gallery->setConfig('baseUri', '/another/path/');
* override the host + path: $gallery->setConfig('baseUri', 'example.com/gallery2/');
* override the protocol + host + path + file:
* $gallery->setConfig('baseUri', 'https://example.com:8080/gallery2/index.php');
*/
$gallery->setConfig('baseUri', '');

 
blacksburgpoker

Joined: 2005-11-26
Posts: 108
Posted: Thu, 2006-11-16 17:12

I found the solution. Apparently gallery puts URLs out based on what URL it was visited on.

So, I fixed the links pointing to the gallery and it was fixed.

Thanks

==================================
Website Design and SEO | Poker Picture Gallery | Free Desktop Wallpapers

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Mon, 2006-11-27 12:40

if you have mod_rewrite you can force www with

RewriteCond ${HTTP_HOST} !^www\.
RewrteRule (.*) http://www.example.com$1 [R]