Skip to content
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

problem with html relative path using '../' and application configured with a subpath #132

Open
leonarf opened this issue Nov 27, 2023 · 0 comments

Comments

@leonarf
Copy link

leonarf commented Nov 27, 2023

Describe the bug

I have installed my_webapp on a domain ('https://lebasic.nohost.me') with a subpath ('/parcel/') and my website contains some HTML script tag containing '../' such as "<script src="../assets/js/range.js">"

The bug is that it seems the website is looking for these assets at the path "https://lebasic.nohost.me/assets/js/range.js" instead of "https://lebasic.nohost.me/parcel/../assets/js/range.js"

I don't know if it's possible to make it work with nginx (and to include the change to the web_app code), or if I have to change the source code?

Context

  • Hardware: VPS at OVH
  • YunoHost version: 11.2.5
  • I have access to my server: Through SSH | through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
    • If yes, please explain: My website source code is in 2 separate folders that are in same folder as the 'www' folder expected by the application, one which is a symbolic link to the expected 'www' folder. Such as :
root@lebasic:/var/www/my_webapp# ls -l /var/www/my_webapp/
total 8
drwxr-xr-x 3 my_webapp my_webapp 4096 Nov 21 14:09 partials
drwxr-xr-x 5 my_webapp my_webapp 4096 Nov 21 14:09 partials-pages
lrwxrwxrwx 1 root      root        14 Nov 21 21:24 www -> partials-pages
  • Using, or trying to install package version/branch: 1.0~ynh15

Steps to reproduce

  1. Install the app
  2. Configure a subfolder
  3. Write some HTML code that include a script file that is in parent folder, such as <script src="../assets/js/range.js">

Logs

My website is accessible at https://lebasic.nohost.me/parcel/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant