Welcome Guest, Not a member yet? Register   Sign In
Getting rid of having to use index.php in the URL
#1

[eluser]Doug Lerner[/eluser]
Right now the URL to a controller in my application folder (after moving the system folder to the site root) is:

http://mydomain.com/CI/app1/index.php/welcome

This works, and loads the view for the default welcome controller that comes with CI.

I want to get rid of the index.php from the URL though. The docs say to make an .htaccess file with the following in it:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

I did that and added it to the app1 folder, but it didn't seem to have any affect. I still need the index.php in the URL or I get a page not found error.

Am I putting the .htaccess file in the wrong place? Or do I need to set permissions for that file? Or....?

I have a .htaccess file inside public_html already and didn't want to mess with that one. I thought that I could have a separate one in in app1 folder itself to deal with rewrite in that hierarchy. No?

Thanks for any suggestions,

doug


Messages In This Thread
Getting rid of having to use index.php in the URL - by El Forum - 07-07-2008, 01:29 AM
Getting rid of having to use index.php in the URL - by El Forum - 07-07-2008, 01:46 AM
Getting rid of having to use index.php in the URL - by El Forum - 07-07-2008, 01:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB