CodeIgniter Forums
.htaccess to allow script access in cgi-bin folder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter Archived (from EllisLab) (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: .htaccess to allow script access in cgi-bin folder (/thread-12153.html)



.htaccess to allow script access in cgi-bin folder - El Forum - 10-08-2008

[eluser]Yednotek[/eluser]
I figured I'd put my reponse to this post in a new thread.

I need to access the mail.cgi script in my cgi-bin folder, but I keep getting a 404 page not found error. My .htaccess looks like this:

Code:
RewriteEngine on
RewriteCond $1 !^(trans\.php|index\.php|images|forum|cgi-bin|css|links|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

I have tried adding "mail\.cgi" and "cgi-bin/mail\.cgi" to the exclusion list but to no avail. Anyone have any suggestions?

Thanks!


.htaccess to allow script access in cgi-bin folder - El Forum - 10-13-2008

[eluser]Yednotek[/eluser]
Still looking for a solution to this...


.htaccess to allow script access in cgi-bin folder - El Forum - 07-14-2009

[eluser]Unknown[/eluser]
Hi,

I really struggled with this problem too. This is how I got round it:

Code:
RewriteEngine on

RewriteBase /

RewriteCond $1 ^(cgi\-bin)
RewriteRule ^(.*)$ cgi-bin/$1 [L]

RewriteCond $1 !^(index\.php|images|css|robots\.txt|favicon\.ico|js|uploads|flash|cgi\-bin)
RewriteRule ^(.*)$ index\.php/$1 [L]