-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slash is appers in the begining of Uri/path on one server, and not appears in another #1794
Comments
This is related to Does this code give the same output on both servers? $uri = $this->request->getUri();
var_dump($uri->getBasePath() . $uri->getPath()); |
@akrabat nope, on the dev result is '/hottest2', on prod "/test2" |
I think that path must be same, not depending on script location, isn't it? |
ah yes - basePath doesn't end with a '/' |
The URIs you are using are different, so the path will be different. Slim tries to remove this difference by putting the path to index.php into basePath, leaving the rest of the path in path. This definitely causes confusion, so more work is required here. |
Duplicate of #1554. Personally I still think behaviour of |
Can confirm on 3.2.1
string(5) "test2" when installed in a subdirectory |
I suspect we can't change this in Slim 3 as we'll break existing applications. |
Pull request #2115 fixes this in Slim 4 |
Hi! I found some issue in the Uri parser.
I have different results on different servers
test2
and/test2
for this code:On the first server (dev) index.php is not in the HTTP root (in subdirectory), and on the second (prod) index.php is in the HTTP root.
I have slim-3.2.1 on both servers.
Dev server:
Prod server:
The text was updated successfully, but these errors were encountered: