404's on files within sub directory #2975

Closed
opened 2025-11-02 04:55:49 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @Nubston on GitHub (Feb 26, 2019).

  • Gitea version (or commit ref):1.7.1
  • Git version:2.20.0
  • Operating system: Windows Server 2016 Standard
  • Database (use [x]):
    • PostgreSQL
    • [ x ] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • [ x ] No
    • Not relevant
  • Log gist:

Description

when i try to accsess a file within this sub folder it just 404s i can get into the folder inside that folder but if i try to open the file it just 404's how can i fix this
urlto offendign subdirectory: https://git.thetofushop.net/Nubston/MyFirstApp/src/branch/master/My%20First%20App

Screenshots

Originally created by @Nubston on GitHub (Feb 26, 2019). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref):1.7.1 - Git version:2.20.0 - Operating system: Windows Server 2016 Standard - Database (use `[x]`): - [ ] PostgreSQL - [ x ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ x ] No - [ ] Not relevant - Log gist: ## Description when i try to accsess a file within this sub folder it just 404s i can get into the folder inside that folder but if i try to open the file it just 404's how can i fix this urlto offendign subdirectory: https://git.thetofushop.net/Nubston/MyFirstApp/src/branch/master/My%20First%20App ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/question label 2025-11-02 04:55:49 -06:00
Author
Owner

@lunny commented on GitHub (Feb 26, 2019):

Migrate your repo to https://gitea.com/lunny/MyFirstApp/src/branch/master/My%20First%20App/Program.cs and it seems it worked. Maybe your reverse proxy server misconfigured.

@lunny commented on GitHub (Feb 26, 2019): Migrate your repo to https://gitea.com/lunny/MyFirstApp/src/branch/master/My%20First%20App/Program.cs and it seems it worked. Maybe your reverse proxy server misconfigured.
Author
Owner

@Nubston commented on GitHub (Feb 26, 2019):

figured it otu for anyone who has this issue in the future

add this to your web.config on the sub domain you are using for reverse proxy if you are using IIS

<security> <requestFiltering> <denyUrlSequences> <clear /> </denyUrlSequences> <fileExtensions allowUnlisted="true"> <clear /> </fileExtensions> </requestFiltering> </security>

@Nubston commented on GitHub (Feb 26, 2019): figured it otu for anyone who has this issue in the future add this to your web.config on the sub domain you are using for reverse proxy if you are using IIS `<security> <requestFiltering> <denyUrlSequences> <clear /> </denyUrlSequences> <fileExtensions allowUnlisted="true"> <clear /> </fileExtensions> </requestFiltering> </security>`
Author
Owner

@Nubston commented on GitHub (Feb 26, 2019):

i dont no how to make that code layout properly hopefuly you understand

@Nubston commented on GitHub (Feb 26, 2019): i dont no how to make that code layout properly hopefuly you understand
Author
Owner

@multinerd commented on GitHub (Nov 25, 2019):

@Nubston you life saver! I was going crazy thinking it had something to do with document browsing.

Cleaner format:

    <system.webServer>
        ...
        <security> 
            <requestFiltering> 
                <denyUrlSequences> 
                    <clear /> 
                </denyUrlSequences> 
                <fileExtensions allowUnlisted="true"> 
                    <clear /> 
                </fileExtensions> 
            </requestFiltering> 
        </security>
        ...
    </system.webServer>
@multinerd commented on GitHub (Nov 25, 2019): @Nubston you life saver! I was going crazy thinking it had something to do with document browsing. Cleaner format: ``` <system.webServer> ... <security> <requestFiltering> <denyUrlSequences> <clear /> </denyUrlSequences> <fileExtensions allowUnlisted="true"> <clear /> </fileExtensions> </requestFiltering> </security> ... </system.webServer> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2975