Welcome Guest, Not a member yet? Register   Sign In
remove php from uri for multiple applications
#1

[eluser]tomas[/eluser]
So I had a look at how to remove index.php from my urls and that works just fine ... but I'd like to do the same for multiple applications setup
Code:
application/app1
application/app2
application/app3
system/
...
app1.php
app2.php
app3.php

so basically I have a php for each application and I would like urls such as
Code:
http://www.mysite.com/app1/action_name
http://www.mysite.com/app2/action_name
http://www.mysite.com/app3/action_name

I've set the index_page value to empty
Code:
$config['index_page'] = '';
and used the following .htaccess for the default app and everything worked fine
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

but when I try
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^app1/(.*)$ app1.php?/$1 [L]

I'm seeing the CI's 404 page, but navigating manually to
Code:
http://www.mysite.com/app1.php?/action_name
works

any ideas? has anyone used this kind of setup before?

thanks




Theme © iAndrew 2016 - Forum software by © MyBB