ShoeLace1291 Posted May 16, 2011 Share Posted May 16, 2011 So I've been building a large codeigniter application. I recently decided to split it up into two different applications on the same installation. I have my main application which will be accessed by regular members and guests, and then the admin application. I've set it up so the main site is accessed through the main.php file... just a duplication of the original index.php file but with the application folder modified to applications/main. There's also the admin.php file which is the same as main.php but the application folder is set to applications/admin. My problem is that I want to remove the index files from the url, but I want admin.php to appear as admin/ in the admin application urls. I'm guessing there's a way to do this with HTAcess to change site.com/admin.php/controller to site.com/admin/controller without changing anything in the url of the main application... Only thing is I don't know how to do it. Can anyone point me in the direction I need to be in, or better yet, post any codes that might help? Quote Link to comment https://forums.phpfreaks.com/topic/236524-codeigniter-application-management-and-htaccess/ Share on other sites More sharing options...
ignace Posted May 16, 2011 Share Posted May 16, 2011 RewriteEngine On RewirteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php This will pass anything that's not an actual file to index.php. So if you request /admin/controller it will be passed like this to index.php. It's possible you'll have to change the uri_protocol in your config.php Quote Link to comment https://forums.phpfreaks.com/topic/236524-codeigniter-application-management-and-htaccess/#findComment-1216166 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.