Trying to put a file in controller or view but have it render as a fully pathed URL? |
[eluser]electromute[/eluser]
I am working on a Facebook connect integration with CodeIgniter. I have everything working, but just not exactly the way I want it. Here's the problem: I want my callback URL in my Facebook Connect app to be http://mydomain.com/callbackdir/ The facebook connect relies on a file called xc_receiver.htm to deal with cross-domain authentication issues. Because of the way things are configured, Facebook wants to see this file at: http://mydomain.com/callbackdir/xd_receiver.htm I have my controllers set up with home.php as the default and divided into subdirectories for cleanliness like so: --controllers --home.php -----callbackdir -----home.php -----anotherdir -----home.php Is there any way for me to put my xd_receiver.htm file somewhere and have it look like it's under the directory of my controller, callbackdir? I have everything working fine if I leave FB connect stuff at root. I can leave it there if this is not possible, I just would rather organize things as noted above. Thanks!
[eluser]onejaguar[/eluser]
I know squat about Facebook apps but it sounds like you can do a rewrite in your .htaccess file; e.g.: Code: RewriteEngine on
[eluser]electromute[/eluser]
Ah, of course! That is a very simple solution. So, here's what it looks like: In my .htaccess file, I have: Code: RewriteEngine on In my fbconnect/home.php controller, I have: Code: function xd_receiver(){ So far, so good. Thanks for your help! |
Welcome Guest, Not a member yet? Register Sign In |