CodeIgniter Forums
combining 2 different application - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: combining 2 different application (/showthread.php?tid=3127)



combining 2 different application - El Forum - 09-11-2007

[eluser]dedenf[/eluser]
Hi,

i'm trying to combine 2 different application in one url, i have 1 apps that displaying and manage the newsite its powered by codeigniter, and the other apps is the file sharing application. i try to combine that 2 application but i got stuck in the uri path.
http://example.com/ << news site
http://example.com/appshare/ << file sharing application

appshare is meant to be a subdirectory url path from the "DocumentRoot" of the example.com not as the controller (appshare controller), how do i combine it without calling appshare as the controller? this is like escaping the appshare directory from the CI frameworks.
i've been looking around but have not found the answer yet.

thanks a lot


combining 2 different application - El Forum - 09-12-2007

[eluser]Crafter[/eluser]
Read up on .htaccess - you'll need this to solve your problem.

Here's an example extract of my .htaccess that I carry around from project to peoject.

The comments should be your friend here

Code:
# If the file or directory exists, show it
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

    # Blank queries get sent to the index
    RewriteRule ^$ /index.php [L]

    # All other queries get sent to the index as index.php/whatever
    RewriteRule ^(.*)$ /index.php/$1 [L]

Regards
Pradesh


combining 2 different application - El Forum - 09-12-2007

[eluser]dedenf[/eluser]
Hi Pradesh,

thanks for your solution, it works! Big Grin


combining 2 different application - El Forum - 09-12-2007

[eluser]Crafter[/eluser]
You're welcome. If you wouldn't mind, please change the titltle to [SOLVED] ...<whatever>...