Here comes another new shortcode!
This one allows you to create url's on your domain that redirect anywhere you want. Here's an example: http://titaniumsites.com/facebook will take you to the TitaniumSites Facebook page(who would've guessed!).
Here's how it works. Create a new page with the desired url. In my case, I created a page named facebook, which created a page at http://titaniumsites.com/facebook. Then on that page I put the following shortcode:
Then set the page template to Unbranded Sales Page. This allows the redirect to happen without the template loading, creating a faster redirect. This is a required step!
That's it! Don't put anything else on the page, since it won't be seen. The page is essentially just a placeholder for the redirect!
So what can we use this for? Glad you asked!
- Easy to remember url's. trivette.me/gplus is much easier to remember(and tell others) than https://plus.google.com/115073558164136008184/posts
- Moved pages. Have a popular page that needs to move somewhere else? No problem!
- Affiliate links. If you use affiliate programs then you know that sometimes it's useful to put those links behind your own url's for easier tracking and general use.
By default the shortcode creates a temporary redirect. For you SEO guys and developers, that means it's a 302 redirect. This is useful if you don't want search engines to permanently assume that this page is a redirect. (Maybe you're creating a placeholder page for future use, but want it to redirect somewhere else right now). But you can change it to a permanent(301) redirect if you like. Just add an attribute called status, and set it to permanent. Here's an example:
[redirect url="https://www.facebook.com/titaniumsites" status="permanent"]
Setting it to permanent tells search engines and browsers that this url is just an alias of the redirected url, and will pass page rank from the original url to the secondary one.