juicyfx/vercel-examples

After changing api route path it is not working after deployed on vercel

anjali-251 opened this issue · 0 comments

Bug report

I have server like "api.xxx.dev/backend/..." I have changed prefix backend to api
New path is "api.xxx.dev/api/.."

It is not working on development server getting 404 response code
but If I am using "api.xxx.dev/index.php/api/.." It is working on server

and I need to remove index.php from url

My Routeserviceprovide is

Route::middleware('api')
->prefix('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));

And my .htaccess file is

Options -MultiViews -Indexes
RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^index.php/(.+) /$1 [R=301,L]

Is there any required thing to do on vercel?