![]() |
default htacess causing headaches - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: default htacess causing headaches (/showthread.php?tid=28887) |
default htacess causing headaches - El Forum - 03-24-2010 [eluser]smatakajr[/eluser] Hey Guys This is a wierd one here... you know the default CI .htacess with these lines here RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] Well I have an external custom DB manager ins a/subdir/ to the root CI that I block access with .htaccess authorization So here is the pickle ... if i comment those lines above everything works well for my DB manager ... but i cannot use CI which is not an option If I dont comment those lines i get a CI 404 error accessing the /subdir/ If I remove the .htacess auth from the /subdir/ everything works fine It looks like the call to /subdir/ then the call of .htacess cause the rewrite rule to send to index.php which results in a 404 Does anybody have a way around this... Thanks Ricky default htacess causing headaches - El Forum - 03-24-2010 [eluser]danmontgomery[/eluser] Before those 3 lines, Code: RewriteCond $1 ^(folder_1|folder_2|robots\.txt) You can add any folders or files (be sure to escape special characters) to the list separated by | and they will not be routed through CI... The filenames are relative to the location of .htaccess default htacess causing headaches - El Forum - 03-24-2010 [eluser]smatakajr[/eluser] You are the man!! I was struggling with this for days... if you dont mind me asking what does this do RewriteRule ^(.*)$ - [PT,L] the PT,L part? default htacess causing headaches - El Forum - 03-24-2010 [eluser]smatakajr[/eluser] On second thought.. it worked and let me in, now when i go back to new browser i get 404 error again ![]() default htacess causing headaches - El Forum - 03-24-2010 [eluser]danmontgomery[/eluser] http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html Quote:'passthrough|PT' (pass through to next handler) Quote:'last|L' (last rule) The 404 page might be in browser cache. |