After changing api route path it is not working after deployed on vercel
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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?
- 主要语言
- PHP
- 星标
- 357
- 派生
- 149
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
contributte/vercel-examples 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
contributte/vercel-examples#150 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
contributte/vercel-examples#130 · 1 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 28/100
contributte/vercel-examples#128 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
contributte/vercel-examples#119 ·
-
难度 3/5 1-2 天 新手友好度 25/100
contributte/vercel-examples#113 · 2 条评论 ·
查看 contributte/vercel-examples 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
-
难度 1/5 1 小时以内 新手友好度 85/100
Automattic/static-site-importer#3129 ·
维护者通常 1 天内回复
-
Group 2 - Data Storage | Tripal DBX | Chado Group 5 - Search | ElasticSearch | Views Priority - Medium
难度 2/5 1-3 小时 新手友好度 74/100
-
category::bug code priority::normal
难度 1/5 1-3 小时 新手友好度 85/100
e0ipso/simple_oauth_21#58 ·
维护者通常 1 天内回复