CodeIgniter Forums
htaccess/mod_rewrite query w/ multiple applications - 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: htaccess/mod_rewrite query w/ multiple applications (/showthread.php?tid=16677)



htaccess/mod_rewrite query w/ multiple applications - El Forum - 03-13-2009

[eluser]Michael;[/eluser]
Greetings all,

I am currently working on a project that has taken on the need for multiple applications, however they would share a common system instance.

Is it possible to remove the index.php from the applications using htaccess considering that both applications are present? If so, how? Smile

Thank you,
Michael


htaccess/mod_rewrite query w/ multiple applications - El Forum - 03-13-2009

[eluser]TheFuzzy0ne[/eluser]
Each entry point for the application should (ideally) have it's own index.php in it's Web root, and therefore it's own htaccess file.


htaccess/mod_rewrite query w/ multiple applications - El Forum - 03-13-2009

[eluser]Michael;[/eluser]
The applications both share the same webroot ... currently index.php and admin.php.


htaccess/mod_rewrite query w/ multiple applications - El Forum - 03-13-2009

[eluser]TheFuzzy0ne[/eluser]
How will your application know which request is for which site? Are you using subdomains?


htaccess/mod_rewrite query w/ multiple applications - El Forum - 03-13-2009

[eluser]Michael;[/eluser]
Well, that's kind of what I was asking ... I didn't think it could be done, but honestly did not know.


htaccess/mod_rewrite query w/ multiple applications - El Forum - 03-13-2009

[eluser]TheFuzzy0ne[/eluser]
You'd need to use a subdomain to identify each part of your site, and you'd need to use an htaccess file for the routing. It can be done, not idea how though. htaccess is currently beating me by 2 to nil, so I need to even out the score or better yet, tip the scales in my direction.

If you can sort out the subdomains, I might be able to help with the htaccess file (although I can't promise).


htaccess/mod_rewrite query w/ multiple applications - El Forum - 03-13-2009

[eluser]Michael;[/eluser]
Okay, this was suggested to me a bit ago; but what if I have core.php and admin.php, then simply wanted to remove the .php from the urls? i.e. 'http://example.com/core/controller/method' or 'http://example.com/admin/controller/method'? In the end I think an index of some kind would merely redirect to core.php.

Michael