-22

Need help understanding why this was flagged as not focused enough:

How do I map a url to a specific folder in apache

The question got closed for lacking focus and my ask privileges were revoked despite the fact that it got 2 answers both with upvotes which presumably mean they were helpful to people.

The way I see it is I got punished for my question which led to answers that actually were helpful.

32
  • 22
    Many users refuse to explain their downvotes, as they've found that doing so is often met with verbal abuse, harassment, revenge downvotes, or a simple flat denial that the problems they mentioned exist. Regarding the question itself, note that question bans are never the result of one single question, but a consistent pattern of poorly-received questions. You almost certainly have multiple questions that have been deleted, and those would have gotten you close to the question ban; the most recent one is merely the one that tipped you over the edge.
    – F1Krazy
    Commented Jul 17, 2023 at 19:11
  • 1
    You've actually asked at least two more questions since the linked question, 3 months apart from one another so that is most certainly not the one that triggered the question ban (which restricts you to one every 6 months).
    – F1Krazy
    Commented Jul 17, 2023 at 19:12
  • I only posted 6 or 7 times, only deleted a couple one of which was a dupe. 4 remain and this is the only one with a neg
    – user17929112
    Commented Jul 17, 2023 at 19:13
  • 11
    If you're demanding that people explain their downvotes, why aren't you also demanding why they explain their upvotes? Commented Jul 17, 2023 at 19:18
  • 2
    I don't need explanations for downvotes, but it would be nice to get some feed back other than a "-1"
    – user17929112
    Commented Jul 17, 2023 at 19:19
  • 17
    I downvoted mostly because the tone of the question is overly hostile; for example, the title implicitly accuses people who voted to close of bias. That makes it seem more like an opportunity to rant than a legitimate request for feedback on the question. (I don't have enough domain knowledge to know whether the specific question you refer to is overly broad or not, so I've refrained from voting either way on the question itself). Commented Jul 17, 2023 at 19:22
  • 1
    @ihatzi, comments and votes are for different goals. Discussing them under this question has no actual purpose. Please stop. If you want to discuss their relation, I believe you still can ask more questions on meta, but I wouldn't recommend to: they are not well received.
    – markalex
    Commented Jul 17, 2023 at 19:24
  • 1
    "How is it that an answer by someone with high rep is praised but the question that led to that answer was punished?" Sometimes a low-quality question can have a high-quality answer, irrespective of the rep counts of the question-asker and answerer.
    – F1Krazy
    Commented Jul 17, 2023 at 19:26
  • 3
    Hmm, one unpleasant thing not mentioned in question itself (because OP doesn't see this): one of answer authors has also casted VTC. Feels rather disingenuous.
    – markalex
    Commented Jul 17, 2023 at 19:31
  • 15
    "At least if your going to down vote tell me why?" - Possibly because you are asking us to explain the actions of three specific people made over a year ago, and then poisoning the well by assuming (in the title and tags) that those actions must have reflected some form of "bias"? Commented Jul 17, 2023 at 19:45
  • 2
    "I meant if you are downvoting this post, not the original one." Yes, I understood that completely. Which is why I explained why I am downvoting this post, rather than the original one, by referring to things that you did in this post, not the original one. Commented Jul 17, 2023 at 19:58
  • 8
    Oh, don't be so melodramatic. No-one's smacking anyone.
    – Andy
    Commented Jul 17, 2023 at 20:29
  • 5
    On this Question, I can assure you that Help me understand why this question is not focused enough would have been seen much more favorably by the community than SO Biased : Help me understand why this question is not focused enough. on the Question in question I don't know the technology or tools well enough to comment on its quality., but as a general note, It's fuzzy on what went wrong and what you've tried to resolve the problem. That would be Needs Details rather than Needs Focus, but still at risk of being closed. Commented Jul 17, 2023 at 21:09
  • 7
    What exactly about the closure of that question makes Stack Overflow biased? That’s a serious suggestion and powerful word. Calling the community biased is one of many reasons users avoid explaining their downvotes. Your edits made the question eligible to be reopened you will have to wait till that review process is completed Commented Jul 17, 2023 at 22:36
  • 1
    PMJI, but I think the OP's question seemed more like a "Needs Clarity.." rather than "Needs focus".. fwiw.
    – ewokx
    Commented Jul 18, 2023 at 2:55

3 Answers 3

7

I can see where the close voters are perhaps coming from*1, although it would arguably be "Needs details or clarity", rather than "Needs more focus" (the final "reason" given is not necessarily unanimous).

I did not cast a close vote myself but attempted to seek clarification at the time in comments below the question, but my questions went unanswered. (My questions could have been better, but it was a start.) Had I returned to the question later then a close vote would have been warranted, but there was no further activity on the question (or answers) until now(!?) so I did not get notified.

You've also not given any code sample(s), either what you have tried (not necessarily a close reason in itself IMO, although many would think so) or the contents of your existing .htaccess file, which is arguably more important to reach a solution. (Conflicts with existing directives are a common cause of error.)

Whilst on the face of it, your question looks like a relatively "simple" rewrite, you've not actually stated what the intended target/response is, which makes this impossible to answer succinctly. The devil is in the detail.

@CBroe's answer does exactly what you are asking (the regex is spot on), but this is also why it cannot work*2. It is not "accepted", so I assume it doesn't, but why have you not tried to troubleshoot this in comments?

What is /users/j/o/h/john? "on the server the folder would be in..." ("in" or "at"?) would seem to imply it is a filesystem directory (although I'm not entirely convinced). However, if it is a directory then the target MUST end in a trailing slash, but you have omitted the trailing slash throughout the question. (If you omit the trailing slash then mod_dir will trigger an external redirect to append the trailing slash and the underlying filesystem directory is exposed.) But if it is a directory, what are you expecting to be served? Apache does not serve directories, it serves files. Perhaps the intention is to serve the DirectoryIndex document from that directory? But if that's the case then you should be rewriting directly to the document and cut out the middle man (mod_dir).

I asked in comments, "Are you intending to access files from this subdirectory?". If you are then you will likely need a different rewrite to handle this (or risk exposing the filesystem directory). But if not then why is it a directory and not a simple file (eg. john.html)?

If /users/j/o/h/john is not a physical directory (ie. /users/j/o/h/ is the directory and john is some resource that needs to be served or passed to a front-controller), then this is not going to work. (But you make reference to a front-controller in comments on the other answer?)


*1 Although whether they are really voting for the reasons I've outlined here is another matter.

*2 Although it is missing the L (or END) flag so could also result in a conflict with later directives.

4

The version of the question which was closed doesn't include your recent edits mentioning that you were trying to get RegexRule working. You just said:

Is this possible with .htaccess or some other Apache method?

I didn't vote on the question, but I can see that that general question could be seen as unfocused.

-10

It is ridiculous that your question was closed as "needs more focus". It asks one very specific and answerable question.

Whether it's on-topic: there are almost 73,000 .htaccess questions, you're not gonna convince me that someone suddenly decided that Apache configuration is off-topic. Web servers are software commonly used by developers and I'm tired of (people) pretending it's not.

If people want .htaccess questions gone, they should put in the leg work and have the tag updated and banned. Until then, do not abuse incorrect close vote reasons. I'm so done with that.

28
  • Not to mention that this also involves REGEX
    – user17929112
    Commented Jul 17, 2023 at 19:11
  • 2
    "Not to mention that this also involves REGEX" - my bad, in that case I support it being obliterated.
    – CodeCaster
    Commented Jul 17, 2023 at 19:12
  • 2
    Note that the existence of previous similar questions are meaningless, as many of them were asked before other sites were created. For instance, Apache configuration questions may be more suitable now for Webmasters or Server Fault than SO. Not saying that's necessarily the case here, but justifying asking a question based on the fact others like it have been asked before is invalid logic.
    – Ken White
    Commented Jul 17, 2023 at 19:14
  • Don't like REGEX?
    – user17929112
    Commented Jul 17, 2023 at 19:16
  • @Ken we either accept such questions or we don't, we've been in limbo for a decade already. I find the arbitrary distinction extremely annoying and unproductive, but if someone wants .htaccess questions gone to either of those sites, ban the tag already. Then still, using the wrong close-vote should be a suspendable offense. Even if the close-voters believed .htaccess to be off-topic, they should say so and not pick a random reason.
    – CodeCaster
    Commented Jul 17, 2023 at 19:25
  • @ihatzi no, I do not like the RegEx tag for multiple reasons.
    – CodeCaster
    Commented Jul 17, 2023 at 19:26
  • @CodeCaster Sorry for dragging you into this, you keep getting -1's too now.
    – user17929112
    Commented Jul 17, 2023 at 19:32
  • 1
    @ihatzi me when I'm getting downvoted: thumbs.gfycat.com/…
    – CodeCaster
    Commented Jul 17, 2023 at 19:35
  • 1
    Agree that it is closed for the wrong reason. Disagree that it is on-topic on SO. If we apply this standard for "tools commonly used by programmers", then word, powerpoint and SAP questions are also on topic.
    – BDL
    Commented Jul 17, 2023 at 19:38
  • 3
    @ihatzi: I consider .htaccess questions as off-topic for SO unless they directly involve writing some code and the problem is in the code part. Everything else is server configuration (and the task of a server admin, not a developer) and should be asked on ServerFault.
    – BDL
    Commented Jul 17, 2023 at 19:41
  • 1
    @ihatzi: I have no clue how the solution to your problem looks like. In general, no, the fact that it could involve regex is not enough to make it a programming problem. But the policy for regex is very fuzzy. There are a lot of rep farmers (even with very high rep) on that tag who basically answer anything as if they are regex101 themselves. The only good reason (for me) that the regex tag exists is that you can blacklist all of these questions.
    – BDL
    Commented Jul 17, 2023 at 19:46
  • 4
    @CodeCaster: That's nonsense. Many tags exist for historical reasons, because highly upvoted historical questions were tagged with them. Consider all the computer hardware or OS questions that were asked before SU was created, for example. We don't delete the tags just because the new site was created - the questions stay here because they have a lot of links to them scattered around, and deleting them would invalidate all of those links. There are also many existing tags that start with DO NOT USE THIS TAG. Instead, use... (to be continued)
    – Ken White
    Commented Jul 17, 2023 at 20:35
  • 2
    or directions to post to other sites under certain conditions (see the kubernetes tag wiki for one example where some questions are appropriate here and others belong at Server Fault).
    – Ken White
    Commented Jul 17, 2023 at 20:36
  • 1
    @CodeCaster No, that's clearly not what I'm saying, and I made that clear. My whole commentary has been about your blanket assertion that existing questions on a tag automatically make all other questions related to that tag acceptable. My polnt is that they do not. Existence of a tag or previous question are meaningless. Guidelines evolve over time, and new sites are created (although not as frequently now). The only thing that matter are the guidelines on the specific date that a question is being asked. (continued)
    – Ken White
    Commented Jul 17, 2023 at 23:58
  • 3
    I specifically cited the kubernetes tag as a specific example of a tag that has some questions that are acceptable here and others that are not and should be asked at a different site (Server Fault). A very large percentage of questions using that tag today (and yesterday, and last week) violate the site guidelines, as indicated by that specific tag wiki description and the ALL CAPS note it contains. Gatekeeping (enforcing the guidelines by keeping off-topic questions away) is part of what keeps noise and clutter down here, and is necessary whether you agree or not.
    – Ken White
    Commented Jul 18, 2023 at 0:01