Welcome Guest, Not a member yet? Register   Sign In
"Releasing" a php file from CodeIgniter's grip?
#1

[eluser]dobbler[/eluser]
Hi,

I have this structure:

root
application
css
images
js
mailer
system
uploads

In the "mailer" folder, I have the newsletter manager which runs on "regular" php (not CI structure) but when I try to access "mailer/admin/process.php" I get the "The URI you submitted has disallowed characters." error as it's still being "intercepted" by CI.

Is there a way in either Routes or htaccess to re-route to the php file? It will need to be able to POST to the php file. I've tried a couple of things which get me to the file but nothing is POSTED so it's not registering.

Here's what I've tried:

In htaccess (not sure about this approach):
Code:
# I created a controller called "mailer-process" to post the form to
RewriteRule mailer-process mailer/user/process.php [NC,P]

In Routes:
Code:
$route['mailer-process'] = 'mailer/user/process.php';

Any help would be great,

Thanks,

Rob.
#2

[eluser]WanWizard[/eluser]
You have to exclude the mailer folder from rewriting by using RewriteCond.
#3

[eluser]augustowloch[/eluser]
[quote author="WanWizard" date="1304031941"]You have to exclude the mailer folder from rewriting by using RewriteCond.[/quote]

exactly. I use this line in my .htaccess:

RewriteCond $1 !^(index\.php|captcha|images|robots\.txt|css|javascripts|audio|static|doc)

this means that the rule will apply only if the file requested is NOT into that list (just add excepctions with the pipe symbol (is a logical OR) and remeber to escape the dot character)
#4

[eluser]dobbler[/eluser]
Perfect! Thanks both of you for your help.




Theme © iAndrew 2016 - Forum software by © MyBB