Pro user: automatic redirection from smugmug to my domain

digitalitiesdigitalities Registered Users Posts: 59 Big grins
edited April 19, 2011 in SmugMug Pro Sales Support
Hello,

as I was really satisfied with my smugmug account, I upgraded to Pro. I'm using google anaylitics to keep track of my visitors.

Having upgraded, I've configured my own domain so that now my pages are also reachable via photo.digitalities.com.

My problem now is the unification of traffic statistics and it seems that the only way is to have one site redirected to the other:

https://www.google.com/support/analytics/bin/answer.py?answer=45482

Is it possible to enable that any URL in the form of:

digitalities.smugmug.com/somepath
get redirected to photo.digitalities.com/somepath

?

I guess this is technically possible (at least via javascript). There is any concern on such an action?

Thanks, Sergio
«13

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited October 12, 2006
    Hey Sergio,

    yes it is possible, add the code below to your js (and insert ur domain names)...

    Updated: Now supports both nickname.smugmug.com and www.nickname.smugmug.com
     
    function redirectPath() { 
      re = /((www.)?introversion.smugmug.com)/; 
      tmp = window.location.href; 
      if (re.test(tmp)) { 
        tmp = tmp.replace(re, '[URL="http://www.introversion.com.au/"]www.introversion.com.au[/URL]'); 
        window.location.href = tmp; 
      } 
    }
    redirectPath();  
    
    
    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited October 12, 2006
    devbobo wrote:
    Hey Sergio,

    yes it is possible, add the code below to your js (and insert ur domain names)...
     
    function redirectPath() { 
      re = /(introversion.smugmug.com)/; 
      tmp = window.location.href; 
      if (re.test(tmp)) { 
        tmp = tmp.replace(re, '[URL="http://www.introversion.com.au/"]www.introversion.com.au[/URL]'); 
        window.location.href = tmp; 
      } 
    }
    redirectPath();  
    
    

    Cheers,

    David
    I new there was a reason you had all those computers :devbobo

    bowdown.gif
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited October 12, 2006
    This gets my seal of approval clap.gif

    53333632-L.gif

    I have it now on my site.

    Try it!

    http://williams.smugmug.com
  • digitalitiesdigitalities Registered Users Posts: 59 Big grins
    edited October 12, 2006
    devbobo wrote:
    Hey Sergio,
    yes it is possible, add the code below to your js (and insert ur domain names)...
    wow!!! Not only a place with great photographers... also great technologists around ;).

    Thank you very much!

    Sergio
  • Diane SDiane S Registered Users Posts: 101 Major grins
    edited October 22, 2006
    Didn't work for my GALLERY page.
    hmmm I tried this code in my JS , but when I tested it.. and clicked my GALLERY tab, it redirected me to the smugmug homepage, instead of my galleries. I have removed it from my customization for now, until I figure out what I've done wrong.

    thanks, Diane

    www.dianeschaferphotography.com
    ~~~~~~~~~~~~~~~~~~~~~~
    http://www.dianeschafer.com

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited October 22, 2006
    Diane S wrote:
    hmmm I tried this code in my JS , but when I tested it.. and clicked my GALLERY tab, it redirected me to the smugmug homepage, instead of my galleries. I have removed it from my customization for now, until I figure out what I've done wrong.

    thanks, Diane

    www.dianeschaferphotography.com

    Diane, it *will* work, we promise. Put the code back so we can trouble shoot you deal.gif

    Oh and it's probably because you have allcaps in your /GALLERY ? Dunno ne_nau.gif
  • Diane SDiane S Registered Users Posts: 101 Major grins
    edited October 22, 2006
    Andy wrote:
    Diane, it *will* work, we promise. Put the code back so we can trouble shoot you deal.gif

    Oh and it's probably because you have allcaps in your /GALLERY ? Dunno ne_nau.gif
    okie dokie Andy.. I shall trust the gurus of digital grin...:D I put the code back in , found at the bottom of the js box. Now, when I'm on my site and I click my gallery tab at the top, it redirects me to the Smugmug home page instead of my galleries. eeekkkkkne_nau.gif

    www.dianeschaferphotography.com

    oh dear...now when I click the link below www.dianes.smugmug.com it redirects me back to GoDaddy, my web host site.
    ~~~~~~~~~~~~~~~~~~~~~~
    http://www.dianeschafer.com

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited October 22, 2006
    Diane S wrote:
    okie dokie Andy.. I shall trust the gurus of digital grin.

    One little period... once I deleted the thing in red, you are all set now.



    function redirectPath() {
    re = /(dianes.smugmug.com)/;
    tmp = window.location.href;
    if (re.test(tmp)) {
    tmp = tmp.replace(re, 'www.dianeschaferphotography.com.');
    window.location.href = tmp;
    }
    }
    redirectPath();
  • Diane SDiane S Registered Users Posts: 101 Major grins
    edited October 22, 2006
    WOWOWOW you are like lightning speed fast!! thumb.gif
    clap.gifYou fixed it... I shall not touch it now....very cool......thanks a bunch!
    ~~~~~~~~~~~~~~~~~~~~~~
    http://www.dianeschafer.com

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited October 22, 2006
    Diane S wrote:
    WOWOWOW you are like lightning speed fast!! thumb.gif
    clap.gifYou fixed it... I shall not touch it now....very cool......thanks a bunch!
    Avec plaisir, ma cheri :D
  • Diane SDiane S Registered Users Posts: 101 Major grins
    edited October 22, 2006
    Andy, Just one more thing...

    when I click my url website address as seen in my signature below.. it redirects to GoDaddy, my host for my domain name. Not a biggie problem, cause, when I put my address in the browser window, it goes to my correct homepage via (smugmug), which is what I need for clients.
    thanks Diane
    ~~~~~~~~~~~~~~~~~~~~~~
    http://www.dianeschafer.com

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited October 22, 2006
    Diane S wrote:
    Andy, Just one more thing...

    when I click my url website address as seen in my signature below.. it redirects to GoDaddy, my host for my domain name. Not a biggie problem, cause, when I put my address in the browser window, it goes to my correct homepage via (smugmug), which is what I need for clients.
    thanks Diane

    Change your signature line -

    www.dianeschaferphotography.com is working fine.

    Your regular SmugMug name is

    http://dianes.smugmug.com

    NOT http://www.dianes.smugmug.com deal.gif
  • Diane SDiane S Registered Users Posts: 101 Major grins
    edited October 22, 2006
    Just color me DUH......headscratch.gif

    Ok.. I changed my signature to the dianes.smugmug.com... but when I click my signature address, it still directs me to my host... does it have to do with I originally had smugmug redirected to my host domain name on GoDaddy before I added this new code.. all I was trying to achieve with this new code is change my gallery/client addresses from the dianes.smugmug/gallery### to my website name dianeschaferphotography.com/gallery####. I'm probably not making sense. rolleyes1.gif

    I think I will go jump in the pool and clear my cobwebs... I must say however, digital grin's constant willingness to help and show me the way with web stuff that scares the $%^$ out of me, and the great customization ability... is the reason I renewed my pro account.. I applaud all the tech help and gurus of smugmug and Dgrin... clap.gifclap

    Off to the pool.... back soon.
    ~~~~~~~~~~~~~~~~~~~~~~
    http://www.dianeschafer.com

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited October 22, 2006
    Diane S wrote:
    Off to the pool.... back soon.

    Hope you had a good swim. You simply had your url mistyped, I fixed it for you.
  • Diane SDiane S Registered Users Posts: 101 Major grins
    edited October 22, 2006
    Andy wrote:
    Hope you had a good swim. You simply had your url mistyped, I fixed it for you.


    good grief.. and you do spell check for me too??? AMAZING!!thumb.gif (and I thought I checked that closely) THANKSSSSSSSS... confirms what I said, great tech help and spell check too!!!

    yup, swim was what I needed.. and the water was great...some of the advantages of Florida in October...if you ignore Hurricane season.

    Now ... ummm can you direct me to how I start a BLOG and access it through my smugmug site??? I'm sure you have the answers to all that somewhere here in the hallowed halls of digital grin. :D
    Thanks Andy.. you're the best.
    ~~~~~~~~~~~~~~~~~~~~~~
    http://www.dianeschafer.com

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited October 22, 2006
    Diane S wrote:
    Now ... ummm can you direct me to how I start a BLOG and access it through my smugmug site???
    You could try here:

    http://www.dgrin.com/showthread.php?t=13066&highlight=smugpress

    wave.gif
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited December 12, 2006
    bump. code updated.
    David Parry
    SmugMug API Developer
    My Photos
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited December 12, 2006
    devbobo wrote:
    Hey Sergio,

    yes it is possible, add the code below to your js (and insert ur domain names)...

    Updated: Now supports both nickname.smugmug.com and www.nickname.smugmug.com
     
    function redirectPath() { 
      re = /((www.)?introversion.smugmug.com)/; 
      tmp = window.location.href; 
      if (re.test(tmp)) { 
        tmp = tmp.replace(re, '[URL="http://www.introversion.com.au/"]www.introversion.com.au[/URL]'); 
        window.location.href = tmp; 
      } 
    }
    redirectPath();  
    
    
    Cheers,

    David

    thumb.gif

    53333638-L.gif
  • Diane SDiane S Registered Users Posts: 101 Major grins
    edited December 12, 2006
    Thanks Dev.... cool stuff.. always sumpin' going on around here!clap.gif

    :ivar
    ~~~~~~~~~~~~~~~~~~~~~~
    http://www.dianeschafer.com

  • docwalkerdocwalker Registered Users Posts: 1,867 SmugMug Employee
    edited December 13, 2006
    Sweet thumb.gif
    SmugMug Support Hero
    http://help.smugmug.com
  • DASPortDASPort Registered Users Posts: 16 Big grins
    edited December 17, 2006
    Andy wrote:
    I new there was a reason you had all those computers :devbobo

    bowdown.gif

    I have this pasted in my script, but its not working..headscratch.gif ...I still see dasportraits.smugmug in the script. Other errors maybe? Again, pardon my java/html ignorance...ne_nau.gif
    - Duane
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited December 17, 2006
    DASPort wrote:
    I have this pasted in my script, but its not working..headscratch.gif ...I still see dasportraits.smugmug in the script. Other errors maybe? Again, pardon my java/html ignorance...ne_nau.gif
    You had two fatal errors.


    function redirectPath() {
    re = /(dasportraits.smugmug.com)/;
    tmp = window.location.href;
    if (re.test(tmp)) {
    tmp = tmp.replace(re, 'www.dasportraits.com.');
    window.location.href = tmp;
    }
    }
    redirectPath();


    I fixed it. Your website is not dasportraits.smugmug.com it is das-portraits.smugmug.com and you had an extra period in the code.
  • DASPortDASPort Registered Users Posts: 16 Big grins
    edited December 17, 2006
    Andy wrote:
    You had two fatal errors.


    function redirectPath() {
    re = /(dasportraits.smugmug.com)/;
    tmp = window.location.href;
    if (re.test(tmp)) {
    tmp = tmp.replace(re, 'www.dasportraits.com.');
    window.location.href = tmp;
    }
    }
    redirectPath();


    I fixed it. Your website is not dasportraits.smugmug.com it is das-portraits.smugmug.com and you had an extra period in the code.

    Aaahhh, Got it!.....clap.gif Thanks a bunch!
    - Duane
  • StustaffStustaff Registered Users Posts: 680 Major grins
    edited December 19, 2006
    DASPort wrote:
    Aaahhh, Got it!.....clap.gif Thanks a bunch!

    I just had this in my JS and it tottally broke everything!?

    function redirectPath() {
    re = /(stuarthill.smugmug.com)/;
    tmp = window.location.href;
    if (re.test(tmp)) {
    tmp = tmp.replace(re, 'www.belperphoto.co.uk');
    window.location.href = tmp;
    }
    }
    redirectPath();

    EDIT Removed an extra fullstop but still doesnt work! get a runtime error error on line 6?

    Thanks
    Trapped in my bedroom taking pictures...did i say bedroom? i meant studio!

    My www. place is www.belperphoto.co.uk
    My smugmug galleries at http://stuarthill.smugmug.com
  • ivarivar Registered Users Posts: 8,395 Major grins
    edited December 19, 2006
    Stustaff wrote:
    I just had this in my JS and it tottally broke everything!?

    function redirectPath() {
    re = /(stuarthill.smugmug.com)/;
    tmp = window.location.href;
    if (re.test(tmp)) {
    tmp = tmp.replace(re, 'www.belperphoto.co.uk');
    window.location.href = tmp;
    }
    }
    redirectPath();

    EDIT Removed an extra fullstop but still doesnt work! get a runtime error error on line 6?

    Thanks
    I just added this to your code:
    function redirectPath() { 
      re = /((www.)?stuarthill.smugmug.com)/; 
      tmp = window.location.href; 
      if (re.test(tmp)) { 
        tmp = tmp.replace(re, 'www.belperphoto.co.uk'); 
        window.location.href = tmp; 
      } 
    }
    redirectPath();
    
    It seems to work just fine, check it out: stuarthill.smugmug.com
  • StustaffStustaff Registered Users Posts: 680 Major grins
    edited December 19, 2006
    ivar wrote:
    I just added this to your code:
    function redirectPath() { 
      re = /((www.)?stuarthill.smugmug.com)/; 
      tmp = window.location.href; 
      if (re.test(tmp)) { 
        tmp = tmp.replace(re, 'www.belperphoto.co.uk'); 
        window.location.href = tmp; 
      } 
    }
    redirectPath();
    
    It seems to work just fine, check it out: stuarthill.smugmug.com

    It just redirects me to my homepage? cant actually view my galleries at all?

    EDIT sorry that may not be clear, It now does redirect but it redirects everything! I cant view my actual smugmug pages as everything pushes back to my home page?

    What Im trying to achieve is people who type in my smugmug url go to my homepage, but I still do want people to be able o view my smugmug galleries.
    Trapped in my bedroom taking pictures...did i say bedroom? i meant studio!

    My www. place is www.belperphoto.co.uk
    My smugmug galleries at http://stuarthill.smugmug.com
  • ivarivar Registered Users Posts: 8,395 Major grins
    edited December 19, 2006
    Stustaff wrote:
    It just redirects me to my homepage? cant actually view my galleries at all?
    well, the code redirects your smugmug domain to your custom domain. What is it you are wanting to do?
  • StustaffStustaff Registered Users Posts: 680 Major grins
    edited December 19, 2006
    ivar wrote:
    well, the code redirects your smugmug domain to your custom domain. What is it you are wanting to do?

    Yeh I think this is the wrong code then for what I want!

    I wanted to move people who were coming into my smugmug site from say a google search to my custom domain front page first but then allow them to click on the gallery link to go to my smugmug pages! I guess that cant work though thinking about it?

    Also now I cant get into my customization page to remove the JS that is doing the redirect! can you?

    EDIT ok I worked out how to get in and remove the code! I guess I need to work out what I actually need! Thanks

    btw Cheers for your help so far.
    Trapped in my bedroom taking pictures...did i say bedroom? i meant studio!

    My www. place is www.belperphoto.co.uk
    My smugmug galleries at http://stuarthill.smugmug.com
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited December 19, 2006
    Stustaff wrote:
    Yeh I think this is the wrong code then for what I want!

    I wanted to move people who were coming into my smugmug site from say a google search to my custom domain front page first but then allow them to click on the gallery link to go to my smugmug pages! I guess that cant work though thinking about it?

    Also now I cant get into my customization page to remove the JS that is doing the redirect! can you?

    EDIT ok I worked out how to get in and remove the code! I guess I need to work out what I actually need! Thanks

    btw Cheers for your help so far.
    I'm pretty sure this code will do what you want.
  • StustaffStustaff Registered Users Posts: 680 Major grins
    edited December 19, 2006
    Andy wrote:
    I'm pretty sure this code will do what you want.

    I thought so but when it was in my JS it sent everything that started "stuarthil.smugmug.com..." to www.belperphoto.co.uk

    so for example if im in Belperphoto home page and I click on my Galleries button which linked to "stuarthil.smugmug.com/photography" then it redirected back to Belperphoto home page, so there was no way to view the actual Galleries?

    I just wanted to link to belperphoto if someone typed in "stuarthill.smugmug.com" or went to that from a external link, this code was sending EVERYTHING that started with "stuarthil.smugmug.com" back to the home page.

    basically hope this makes sense...

    "stuarthil.smugmug.com" redirect to "www.belperphoto.co.uk"
    "stuarthil.smugmug.com/Whatever" dont redirect to anywhere.
    Trapped in my bedroom taking pictures...did i say bedroom? i meant studio!

    My www. place is www.belperphoto.co.uk
    My smugmug galleries at http://stuarthill.smugmug.com
Sign In or Register to comment.