[GH-ISSUE #101] Hosting from a sub-directory? #76

Closed
opened 2026-02-25 23:40:36 +03:00 by kerem · 4 comments
Owner

Originally created by @sehailey on GitHub (Nov 1, 2019).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/101

This does not appear to play nicely with subdirectory hosting. I set up nginx to correctly access the directory but all of the static content was 404 and did not include the subdirectory in the request (even though it was included in the url in the config file).

Originally created by @sehailey on GitHub (Nov 1, 2019). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/101 This does not appear to play nicely with subdirectory hosting. I set up nginx to correctly access the directory but all of the static content was 404 and did not include the subdirectory in the request (even though it was included in the url in the config file).
kerem closed this issue 2026-02-25 23:40:36 +03:00
Author
Owner

@thomasdeurloo commented on GitHub (Nov 6, 2019):

Having same issue. Al sources/actions/href in the templates are started with a slash, causing the references to start at the site root, making in impossible to run from subdir.

<link href="/css/bootstrap.min.css" rel="stylesheet">

removing the first slash will solve this issue

<link href="css/bootstrap.min.css" rel="stylesheet">

<!-- gh-comment-id:550451220 --> @thomasdeurloo commented on GitHub (Nov 6, 2019): Having same issue. Al sources/actions/href in the templates are started with a slash, causing the references to start at the site root, making in impossible to run from subdir. `<link href="/css/bootstrap.min.css" rel="stylesheet">` removing the first slash will solve this issue `<link href="css/bootstrap.min.css" rel="stylesheet">`
Author
Owner

@sehailey commented on GitHub (Nov 7, 2019):

Thanks for the suggestion @thomasdeurloo . Removing all of the front slashes from the template (including /api and /js) got me some of the way there. However, trying to open the file after uploading still results in a 404.

Note that the info it gives after the upload is conflicting:

20140167_10102035618795688_5662779144755663256_n.jpg uploaded as r1l50s.jpg
URL: https://websiteURL/pix/r1l50s.jpg

the URL is clickable and is the correct URL (but leads to a 404), whereas the r1l50s.jpg is also clickable, but leads to https://websiteURL/r1l50s.jpg which is the incorrect URL (and also leads to a 404).

I wish I could be more helpful by e.g. making a pull request, but php is not my forte.

<!-- gh-comment-id:551065871 --> @sehailey commented on GitHub (Nov 7, 2019): Thanks for the suggestion @thomasdeurloo . Removing all of the front slashes from the template (including /api and /js) got me some of the way there. However, trying to open the file after uploading still results in a 404. Note that the info it gives after the upload is conflicting: ``` 20140167_10102035618795688_5662779144755663256_n.jpg uploaded as r1l50s.jpg URL: https://websiteURL/pix/r1l50s.jpg ``` the URL is clickable and is the correct URL (but leads to a 404), whereas the r1l50s.jpg is also clickable, but leads to https://websiteURL/r1l50s.jpg which is the incorrect URL (and also leads to a 404). I wish I could be more helpful by e.g. making a pull request, but php is not my forte.
Author
Owner

@thomasdeurloo commented on GitHub (Nov 13, 2019):

I think there must be one slash left ;) in pictshare.js:
href='/"+o.hash+"'

<!-- gh-comment-id:553408065 --> @thomasdeurloo commented on GitHub (Nov 13, 2019): I think there must be one slash left ;) in pictshare.js: `href='/"+o.hash+"'`
Author
Owner

@geek-at commented on GitHub (Jan 5, 2020):

Sorry we dropped support for sub directory hosting with the rewrite. Might implement later but for now it's not supported

<!-- gh-comment-id:570832637 --> @geek-at commented on GitHub (Jan 5, 2020): Sorry we dropped support for sub directory hosting with the rewrite. Might implement later but for now it's not supported
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#76
No description provided.