Welcome Guest, Not a member yet? Register   Sign In
cannot access controller while I have a default controller set
#11

[eluser]Aken[/eluser]
Your RewriteBase has the wrong directory.

Try this - it has the correct RewriteBase directory and I removed a couple unnecessary rules (and comments). Make sure that your RewriteBase is exactly the same as the folder.
Code:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /certifiedAnalytics/

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
  ErrorDocument 404 index.php
</IfModule>

Make sure this .htaccess file is in the same directory as your index.php file.

EDIT: Removed beginning slash from 404 rule and fixed RewriteBase.
#12

[eluser]hamobi[/eluser]
i have copied and pasted this exactly without any luck:

Code:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /certifiedAnalytics/

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
  ErrorDocument 404 index.php
</IfModule>
#13

[eluser]hamobi[/eluser]
thank you for all the help btw
#14

[eluser]hamobi[/eluser]
my .htaccess file is in the root of my application folder adjacent to index.html
#15

[eluser]hamobi[/eluser]
OHHHHHHHHHHHHHHHH FOR SOME REASON ITS IN THE WRONG PLACE!!

it should be in the root next to index.php! that fixed everything!
#16

[eluser]Aken[/eluser]
That's the wrong place. Newer versions of CI come default with two .htaccess files, one each in the application and system folders. Their purpose is to deny requests to those folders in case someone tries to access them directly via the web browser.

If you want to remove index.php from your URLs, you add a third .htaccess in your root folder (wherever index.php is).

So, add the above .htaccess to the certifiedAnalytics folder, and replace the application directory's .htaccess file contents with:
Code:
Deny from all
#17

[eluser]Aken[/eluser]
Cheers, glad you got it working.




Theme © iAndrew 2016 - Forum software by © MyBB