Support the ongoing development of Laravel.io →
Requests Input

I am getting this error on the hosting server. All ajax request are failing with 403 Forbidden error.I am having this issue with XHR Request i.e Ajax Call Put Request. I'm getting this error after modification to htaccess file.

<IfModule mod_rewrite.c>
  AddHandler application/x-httpd-php72 .php
  RewriteEngine On
  # Removes index.php from ExpressionEngine URLs  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?url=$1 [PT,L]

</IfModule>
Last updated 3 years ago.
0

Do you have $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); in the app.js file? Additionally what are you trying to do with the htacces modification?

Last updated 6 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.