Forbidden - You don't have permission to access “foo” on this server |
[eluser]CodeIgniterNewbie[/eluser]
I have a controller that exposes certain methods that were designed to be called by cURL (basically, just access the URL and it'll do its thing). Say the controller name is `api` and the method name is `push`. When I try to cURL it from one of my other controllers, I call the following URL: Code: http://www.domain.com/api/push/ I get the following error: Quote: ForbiddenBut if I just access the URL in the browser, it works fine. Any idea what might be going on?
[eluser]CodeIgniterNewbie[/eluser]
Problem solved. I had IP restrictions in my htaccess. The server's IP was not allowed, thus when the code try to access the URL, it got a 403 error.
[eluser]edidiway[/eluser]
Hi CodeIgniterNewbie, can you explain how to fix the IP Restrictions? i have same problem, its fine on my local, but error on server. thank you
[eluser]CodeIgniterNewbie[/eluser]
Do you have an .htaccess file that allows/denies access based on IP?
[eluser]CodeIgniterNewbie[/eluser]
If you do, just add your server's IP address in the allowed list. That way, when cURL - which is connecting from your server's IP -- tries to connect to the server, it will be given access.
[eluser]edidiway[/eluser]
my .htaccess is like this Code: RewriteEngine on sorry my problem is not about cURL, but the scenario is like this 1. I open link : http://www.edidiway.com/rinnai/admin/ser..._edit/15/1 2. There are title(textbox) and map(textarea) in the form 3. I fill the title and map field with "test" word and click Update. It run well. 4. But if I fill the map(textarea) with the true google map embed code like this : "<iframe width="595" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.co.id/maps? f=q&source=s_q&hl=id&geocode;=&q=jalan+haji+agus+salim,+malang& aq;=&sll=-7.781568,110.364053&sspn=0.012161,0.01929& ie=UTF8&hq;=&hnear=Jalan+Kyai+Haji+Agus+Salim,+Malang,+Jawa+Timur& t=m&z=14&ll=-7.983847,112.632222&output=embed"></iframe><br /><small><a href="https://maps.google.co.id/maps?f=q&source=embed&hl=id&geocode;=&q=jalan+haji+agus+salim,+malang& aq;=&sll=-7.781568,110.364053& sspn=0.012161,0.01929&ie=UTF8& hq;=&hnear=Jalan+Kyai+Haji+Agus+Salim,+Malang,+Jawa+Timur&t=m&z=14& ll=-7.983847,112.632222">Lihat Peta Lebih Besar</a></small>" Then I click update button. I get error like this : Forbidden You don't have permission to access /rinnai/admin/services/service_edit/15/1 on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Please help if you have any solution. thanks.
[eluser]CodeIgniterNewbie[/eluser]
Is this a valid URL: Code: /rinnai/admin/services/service_edit/15/1 ??? Please provide link to your site if you can.
[eluser]edidiway[/eluser]
yes it is a valid URL. for example I have make testing url like this : http://www.edidiway.com/rinnai/admin/testing On that link you can submit whatever word, and success, but if you submit "<iframe>" word. it will get an error like this Forbidden You don’t have permission to access /rinnai/admin/services/service_edit/15/1 on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. can you help me to tell what is the problem ?
[eluser]CodeIgniterNewbie[/eluser]
Can you show the code that handles the form? |
Welcome Guest, Not a member yet? Register Sign In |