Google plus profile

After reading this blog post from Joerg Moellenkamp’s blog, I decided to “emulate” the way he linked to his Google+ Profile. I’m not sure how he did it but here is how I was able to accomplish the same thing using Apache’s .htaccess file and PHP. Like always, there are many ways to skin a cat so your mileage may vary.

  • Since I already use mod_rewrite, I updated my $DOCUMENT_ROOT/.htaccess file with the following code:
  •         RewriteRule ^(\+)(/.*)?$    $1.php
    
  • Then, I created a PHP script called +.php and placed it in my website’s $DOCUMENT_ROOT path with the following code:
  • < ?php
       header( 'Location: https://plus.google.com/101324321036313305633' ) ;
    ?>
    

    All you need to do is replace the URL in the PHP code with your own Google+ Profile page. Since my website URL is alittlestupid.com, I would use http://alittlestupid.com/+ and it will redirect you to my Google+ Profile page. You would obviously have to use your own website’s URL plus the “+” sign.


    About this entry