Welcome Guest, Not a member yet? Register   Sign In
htaccess and multiple applications
#11

[eluser]trice22[/eluser]
I'm afraid I'll have to ask for some help again—I got stuck with my 404 after all.

If I remove the .htaccess both:
Code:
http://localhost:8888/ci_test/backend_index.php
and
Code:
http://localhost:8888/ci_test/frontend_index.php
works just fine.
But with the .htaccess (see above) only the frontend-part works, every controller in the backend returns a 404 and I'm starting to think I might still have a problem with the .htaccess.

I've tried:
Code:
RewriteEngine on

RewriteRule ^cms$ backend_index.php [L]
RewriteRule ^cms/(.*)$ backend_index.php/$1 [L]

RewriteCond $1 !^(frontend_index\.php|assets)
RewriteRule ^(.*)$ /ci_test/frontend_index.php/$1 [L]
and
Code:
RewriteEngine on

RewriteRule ^cms$ /ci_test/backend_index.php [L]
RewriteRule ^cms/(.*)$ /ci_test/backend_index.php/$1 [L]

RewriteCond $1 !^(frontend_index\.php|assets)
RewriteRule ^(.*)$ /ci_test/frontend_index.php/$1 [L]

Every help would be very appreciated.
Thanks,
—trice
#12

[eluser]esra[/eluser]
You should investigate if Matchbox will fill your needs. Matchbox modules can include a directory stucture identical to an application. Then you could create a admin module and use a url like this to access your admin controllers:

http://yourdomain.com/admin/contacts/

where admin is a modulename and contacts is a controller called contacts.

The above url assumes that an .htacess file is used to remove index.php only.

You can also create subdirectories under modules/admin/controllers/, modules/admin/models/, modules/admin/views/ if you want to store your admin/specific controllers, models, and views in their own directories.

Matchbox is very easy to install. Creating a module from your existing code is simply a matter of moving your files from the existing CI directories into module-specific directories.




Theme © iAndrew 2016 - Forum software by © MyBB