CodeIgniter Forums

Full Version: .htaccess to allow script access in cgi-bin folder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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!

El Forum

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

El Forum

[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]