CodeIgniter Forums
Other folders not accessible (codeigniter thinks there controllers) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Other folders not accessible (codeigniter thinks there controllers) (/showthread.php?tid=37869)



Other folders not accessible (codeigniter thinks there controllers) - El Forum - 01-23-2011

[eluser]Unknown[/eluser]
Hello,

I've used codeigniter for my website on my website i have a htpassword protected folder called dev.

I removed index.php from the codeigniter url and now i cant access the folder dev/ cause codeigniter thinks its a controller. it gives me a 404.

So www.mydomain.nl works fine. but www.mydomain.nl/dev doesnt work and gives me a 404.

Here is my htaccess
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    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} ^i2i_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} ^i2i_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>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

Grtz,

Thomas
The Netherlands


Other folders not accessible (codeigniter thinks there controllers) - El Forum - 01-24-2011

[eluser]Krzemo[/eluser]
Try setting RewriteBase to /dev/


Other folders not accessible (codeigniter thinks there controllers) - El Forum - 01-24-2011

[eluser]Unknown[/eluser]
Its fixed by adding the following

RewriteCond %{REQUEST_FILENAME} ^dev/.*