2
votes

I'm using laravel as the app framework and for this specific part, the user needs to pass an IP address over.

I'm using the following system and routing it to a controller properly. Unfortunately, the url http://website.com/request/APIKEYGOESHERE/DATATYPE/73.180.203.228 returns a 404 error. Basically, If i include the IP address in that format, I'm getting a 404 error returned for some odd reason. I am using an LEMP stack.

For my routes file:

Route::get('request/{apikey?}/{datatype?}/{payload?}', array('as' => 'request', 'uses' => 'APIRequestModuleController@getIndex'));

Successfully passes to my getIndex function for the APIRequestModule Controller.

Everything works, but when I put an IP address there, it screws up and throws a 404. Is this with my route or a nginx conf issue? Payload can be IP or really much anything. Do i need to customize something?

Thanks!

1
Works fine for me on Apache. Post your Nginx config. Maybe your URL rewriting is mutilating the URL because of the IP address?Kryten
Yes, it was nginx config! Thanks.George

1 Answers

0
votes

You need to make sure your nginx config uses the following line after location / {

         try_files $uri $uri/ /index.php$is_args$args;

Once that's in there, that's all! It works like a charm, in case anyone else has the problem with periods or other symbols in their links.