0

As of right now... This is the address that shows up when I run the application (and it's functional).

http://localhost:8888/baseline/index.php

If I take away the index.php it also works...

http://localhost:8888/baseline/

Running these two URI's is the same as running this function (which is functional).

http://localhost:8888/baseline/index.php/RegisterController/index

But if I try and run it without the index.php it's not functional...

http://localhost:8888/baseline/RegisterController/index

In my code I have 2 .htaccess files...

enter image description here

In the one that is right underneath "views" the code is this...

Deny from all
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L] 

In the one underneath "system" the code is this...

AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L] 

# my url is http://localhost/arny
#RewriteBase /arny/
# set your own
RewriteBase /

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

This is what my config file looks like... enter image description here

I've tried setting it from 'AUTO' to 'PATH_INFO' and haven't had any luck there. There has been some talk about changing things on Apache but I have no idea how to do that.

I already checked out the following posts and wasn't able to get this working...

I'm currently running...

  • Netbeans 7.3.1
  • CodeIgniter + Twitter BootStrap Boilerplate
  • MAMP 2.2

Definitely let me know what other information I can provide and I'll re-edit the post. I definitely feel like an idiot after wading through these other pieces of documentation and still not being able to get this figured out.

Community
  • 1
  • 1
Pascal Wagner
  • 207
  • 4
  • 14

2 Answers2

1

I've been playing around with it as well. This is the one which works for me, and I fear touching it: ;) j/k

RewriteEngine On
RewriteRule ^(resources)/(.*) $1/$2 [L]
RewriteRule ^(user_guide)/(.*) $1/$2 [L]
RewriteRule (.*) index.php?$1 [L]

It is located outside the application/system/user_guide directories. Resources is my own public folder, ignore that line.

I haven't touched the internal .htaccess files. They're what they were:

Deny from all

Hope this helps :)

Edit: Also check if you have the mod_rewrite enabled..

And this.. Remove index.php in CodeIgniter_2.1.4

Community
  • 1
  • 1
Chinmay
  • 4,726
  • 6
  • 29
  • 36
0

Try using this under your system folder. This will allow the the extensions that you need passed through. ( Style Sheets , Scripts, etc... )

RewriteEngine On

RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]
brasofilo
  • 25,496
  • 15
  • 91
  • 179
  • The `%{REQUEST_FILENAME} !-f` already allows static assets to pass through. This is just adding an arbitrary list of paths that will not go to the front controller. – Steve Buzonas May 27 '14 at 16:35