I've recently started to need a URL shortener service for one of my web sites. I thought about farming it all out to some other company, but realized that the domain I need to shorten URLs for is incredibly short already. So, I'm creating an in-house URL shortener. Here's how it's laid out in theory:
1. .htaccess sees an incoming request for a URL with a page name beginning with "Z" (for example, example.com/Z00101 since nothing I have begins with a capital Z, this seems like an OK flag) and 301's it to /short.php
2. short.php extracts the page code from the forwarded address and looks up the full address in the database.
3. short.php squirts out its own 301 to the final destination.
So what happens is I have two 301's.
example.com/Z00101 >301> short.php >301> example.com/original.long.page.here.php
So my questions are --
Is having TWO 301's a problem? Will the search engines understand that example.com/Z00101 == example.com/original.long.page.here.php, or will they decide that example.com/Z00101 == short.php?
Will this redirecting affect page rankings in any way?
Will this set off suspicious alarms at the search engines?