Search This Blog

Wednesday, 3 August 2011

A way/hack to use your own domain with Google Picasa

Assumes you already have :

a - domain
b - it being hosted somewhere with some space
c - access to create/edit .htaccess file.

Open up one of your galleries and we're looking for the part of the URL after google.com.

eg: http://picasaweb.google.com/paulregan73/GalleryName

In that URL paulregan73 is my Picasa user name and will remain on the new URL we'll create.

Now add the following to the .htaccess file, replace picasauser with your specific account name.

RewriteRule ^picasauser(.*) http://picasaweb.google.com/picasauser$1 [NC,P,L] #Rev proxy picasa
RewriteRule ^m(.*) http://picasaweb.google.com/m$1 [NC,P,L] #Rev proxy mobile picasa

The first rule means you can now hit the Picasa files using :

http://your_domain/picasauser/gallery
NB// Of course this only works for public galleries and not private/https - the google.com cert will fail for private.


The second rule takes care of mobile users. Google will redirect them to /m. Having this rule seems to take care of that.

EDIT : 24/8/2011 - Google seem to be switching the user id part of the URL from the name to a numerical representation of you google id.

https://picasaweb.google.com/102726977217362443519

So a new line in My .htaccess :

RewriteRule ^102726977217362443519(.*) http://picasaweb.google.com/102726977217362443519$1 [NC,P,L] #Rev proxy picasa url to paulregan.co.uk


It also looks like Google are redirecting all mobile access to https. So the ^m(.*) above still works if you specify the full mobile url, eg something like :
http://www.paulregan.co.uk/m/viewAlbum?uname=paulregan73&aid=5635917397624685905&start=0&fgl=true&pli=1


but when you use a regular link and hit it with a mobile client the https gets in the way and your dumped on the picasa login screen ... booooo. I'll keep playing with this but I don't see a way around it, which kind makes the whole thing worthless now. Maybe Google will let us use our own domains in the future, a-la blogger ..