Sunday, January 4, 2009

PHP - MySQL woes...

Okay I've been marketing my artistic photography (and other cool stuff) online for a while now. This involves linking to my items, usually through some long convoluted URL. like:

http://www.somename.com/dept/add2cart.cgi?product_number=1687564695&acc=more&onandon=ONandONweGO...etc

You get the picture.

Well Dan Raine (of IE & 30DC fame) gave out some cool goodies for xmas this year, including Redirection Rocket.

Redirection Rocket is a handy set of PHP scripts that shortens these long URLs into nice ciustom (whatever you want) URLs and stores them in a MySQL database.

Heres my problem:

The redirection only works when the destination URL is a short "clean" URL (no special characters: ? + = etc)

example: Let's say I want to send people to my zazzle gallery with this link:

http://snazland.net/recommends/FineArtPhotos

Using the Red'Rocket interface I set it all up so that the desired link will redirect/cloak the actual (long) URL. I get strange results... Depending on the destination URL structure

http://www.zazzle.com/ - works OK
http://www.zazzle.com/word1001 - works OK

http://www.zazzle.com/?rf=238571857448421591 - FAILS
http://any.url.with.special.characters.com/?here_we_go=not - FAILS

Failures are blank pages, 301 error pages, 404 error pages, etc...

I've tried \ un-escaping special characters. %3F hex encoding special characters...

I'm about out of options troubleshooting this. Any PHP wizards have an idea/suggestions???

Thanks



Blogged with the Flock Browser

No comments: