问题描述
Symfony/API 平台有没有办法在尾随斜杠时防止 URL 重定向?
例如:
$ curl http://127.0.0.1:8000/api/entities/
<!DOCTYPE html>
<html>
<head>
<Meta charset="UTF-8" />
<Meta http-equiv="refresh" content="0;url='http://127.0.0.1:8000/api/entities'" />
<title>Redirecting to http://127.0.0.1:8000/api/entities</title>
</head>
<body>
Redirecting to <a href="http://127.0.0.1:8000/api/entities">http://127.0.0.1:8000/api/entities</a>.
</body>
</html>
基本上我只是希望所有 API 平台路由同时在 /something
和 /something/
可用。
我怎样才能做到这一点?有什么线索吗?
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)