After changing api route path it is not working after deployed on vercel
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Start with the RouteServiceProvider route group, routes/api.php, and the shown .htaccess rules, then check how this PHP example is configured for Vercel deployment. Reproduce the deployed request with and without index.php and determine what configuration or rewrite behavior causes the 404. Done means the /api/... route works on Vercel without index.php.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 -IndexesRewriteEngine 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?
- Ngôn ngữ chính
- PHP
- Star
- 357
- Fork
- 149
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của contributte/vercel-examples
-
ERROR: DEPLOY TO LARAVELĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
contributte/vercel-examples#150 · 2 bình luận ·
-
laravel v10 doesnt supported?Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
contributte/vercel-examples#130 · 1 bình luận · 1 reaction ·
-
Execute artisan command(s)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
contributte/vercel-examples#128 · 1 bình luận ·
-
new symfony projectĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
contributte/vercel-examples#119 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
contributte/vercel-examples#113 · 2 bình luận ·
Tất cả issue của contributte/vercel-examples
Issue tương tự
-
Group 2 - Data Storage | Tripal DBX | Chado Group 5 - Search | ElasticSearch | Views Priority - Medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
nginx update required due to NGINX2RootCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
mailcow/mailcow-dockerized#7668 · 5 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
lara-zeus/spatie-translatable#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
small
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
uiowa/uiowa#10296 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
asyncapi/modelina#2709 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày