I have a Facebook Canvas app that works with ids ?id= and I wanted to make the urls look a bit nicer so I added this to my htaccess file.
RewriteEngine On
RewriteRule ^u(.*?)\.php$ index.php?id=$1
This is the Login url for facebook
$facebook->getLoginUrl(array('canvas' => 1, 'scope' => 'permissions', 'redirect_uri' => 'http://domain.com/u'.$id.'.php'));
So it goes to u123456789.php after authenticating. Now my problem is that $facebook->getUser(); always returns 0 even if the user has authenticated and allowed the app because of that redirect.
If I redirect to index.php after authenticating it works fine.
I think this is caused by the session or something. Is there any solution to make it work?
Thanks in advance