mardi 1 septembre 2015

Route Post Returning 403

I have a perfectly working web site on Local Machine(Wamp).. But When i uploaded that to Production (Litespeed), i get following issue.

In the production all the pages are working except a page to edit products. Product edit page loads perfectly but when click on submit button i get 403 exception from server (not laravel). (.htaccess and all sources are same in production and local)

routes.php

Route::post('admin/product/{id}/update', 'Admin\ProductController@update');

Product Edit

<form class="form-horizontal" role="form" method="POST" enctype="multipart/form-data" action="{{ url('/admin/product/'. $product->id . '/update') }}">
                    <input type="hidden" name="_token" value="{{ csrf_token() }}"> 

....

</form>

ProductController

    public function update($id, Request $request)
    {
      return 'hi';
      //My own logic
    }

The above code work perfectly in local, but in production i am not getting a page with 'hi' as return. instead i get error 403 from the lite-speed server. which means public function update is not getting hit in production.

Not any other post methods are getting hit in server.. all other pages working fine in production

.htaccess

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
 </IfModule>

..



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Xc2cSA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire