0

I asked a question yesterday about why the index.php is not being redirected to if you are inside a subdirectory. Which was marked as unclear what I was asking. I disagree with the flag and I'll clarify why my answer is clear. Line by line.

any redirect to localhost/ is simply redirected to index.php

This line is very simple and understandable. If you go to the localhost, you'll be redirected to the index.php page for certain conditions

but if you go inside the localhost/phone subdirectory, there's an index.php page too

Again this line makes it clear that there's an index.php page inside the directory localhost/phone too

and as you type localhost/phone/ you are not redirected to the index.php page

Which means that if you type localhost/ you are redirected to the index.php page and if you type localhost/phone/ in the address bar then you are not redirected to the index.php page inside the phone directory. That's the problem.

Now I researched and attempted to solve my problem by adding another code block which in turns works but doesn't solve the problem.

but now all the url's inside /phone/ is showing blank.

This line says that after my attempt, all the urls' inside the phone directory shows a blank page. And by the blank page, what I mean is also in the question.

Perhaps I made myself clear on meta about why my question is clear,
The problem, the attempt at solution and before asking, I also researched about it and attempted to solve it first, but no luck.
That's why I asked it on SF.

1 Answer 1

6

Your post was closed as "Unclear what you're asking" because, at the time, it did not include a question. It was a statement.

Post-edit, there is now a question, however it is not one which is answerable by the standards of the site. We don't deal in "ideas", we deal in specific answers to specific, reproducible problems. There isn't enough information to reproduce the problem described -- specifically, the filesystem layout which nginx is trying to work within. I have updated the close reason to reflect the new state of the post.

As a side note, I'm somewhat skeptical of the accuracy of the details you have provided, as the error message you quote was edited in-place (suggesting that it was not, initially, a direct copy-paste from the relevant logs), and both before and after the edit the error message doesn't match either the behaviour you describe as observing, nor the configuration you provided.

5
  • I edited the error log because I didn't want to show my root folder name. the desired end state, the specific problem or error, I have stated the error and quoted it sufficient information about the configuration and environment to reproduce it, and attempted solutions. I have pasted my whole nginx server configuration and also attempted to solve my problem and also stated it in the question
    – weegee
    May 10, 2019 at 16:16
  • specifically, the filesystem layout which nginx is trying to work within. Please refer to my question again and see the error which I quoted, it holds a location like "C:\xyz\nginx/xyz/phone/index" and the server root proves the root as the folder xyz so the folder structure is obvious.
    – weegee
    May 10, 2019 at 16:18
  • the error message doesn't match either the behaviour you describe as observing, nor the configuration you provided. I clearly stated that "By "showing blank" means that they show a 404 error according to the error log" I stated the behavior and what the behavior means and what does the error log says.
    – weegee
    May 10, 2019 at 16:20
  • I agree with all the assessments above but they contradict with the reason you flagged my answer with. There, I haven't provided enough reasons, and resources to reproduce it and to debug it.
    – weegee
    May 10, 2019 at 16:29
  • 2
    Find a nearby colleague, and ask them to reproduce the problem you're seeing, using only the information given in your question. If they can do it, and the environment they configure is functionally identical to yours, then you're golden. When they can't reproduce your problem and the environment in which is occurs, identify what's different between your environment and theirs, and add that information to your question.
    – womble Mod
    May 10, 2019 at 22:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .