mathiasbynens/php-url-shortener — Issue #5: Installation problem
Author: svw
Created: 2012-01-31 08:44:12+00:00
State: open

I've this domain http://kir.im I want it to be a url-shortener but also functional at the same time, so people could still access the root domain. Is it possible if I install the script on sub-directory but the shortener use the root url? So the link wouldn't become like http://kir.im/mths/aaa but still http://kir.im/aaa

I've tried to put the script on root directory with these settings :
define('SHORT_URL', 'http://kir.im/'); // include the trailing slash!
define('DEFAULT_URL', 'http://kir.im'); // omit the trailing slash!

those make the site inaccessible Safari told something like "it's too many redirect so Safari can't open the site", I've made change to :
define('SHORT_URL', 'http://kir.im/'); // include the trailing slash!
define('DEFAULT_URL', 'http://another.url'); // omit the trailing slash!
those still not working too resulted 404 Not Found

I just make the fresh install of the script just to test it out http://kir.im/mths
I've the prompt like this :
javascript:(function(){var%20q=prompt('URL:');if(q){document.location='http://kir.im/mths/shorten?url='+encodeURIComponent(q)}}());
I've tried the url on the prompt with or without sub directory, it still result 404 Not Found

I hope this make sense, could you help?