Welcome! Log In Create A New Profile

Advanced

Re: Prefixing URL's

Maxim Dounin
December 28, 2010 08:56AM
Hello!

On Tue, Dec 28, 2010 at 12:12:49AM -0500, David J. wrote:

> I have an app that uses relative URLs
>
> ie: /media/assets/css/style.css
>
> in my server config I have
>
> location /app {
>
> #config stuff here.
> }
>
> When I go to "/app" from a browser the urls are not prefixed with
> "/app" they stay the same ie: "/media/assets/css/style.css"
>
> But because I mounted the "/app" rather than the root "/" the urls
> are no longer valid.
>
> "/media/assets/css/style.css" should be "/app/media/assets/css/style.css"
>
> What options are available to fix this?

By saying "not prefixed" you mean nginx doesn't replace urls in
your app's response? It is not supposed to do so.

Some trivial things may be resolved with sub filter module[1], more
complex cases generally require fixing application.

[1] http://wiki.nginx.org/HttpSubModule

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Prefixing URL's

David J. December 28, 2010 12:16AM

Re: Prefixing URL's

António P. P. Almeida December 28, 2010 06:16AM

Re: Prefixing URL's

Maxim Dounin December 28, 2010 08:56AM

Re: Prefixing URL's

Eugaia December 28, 2010 09:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 85
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready