Dear all,

in order to have prettier URLs I have decided to move my joomla from
/web/ to /, but I want old URLs to transparently redirect.

I am struggling how to do this.

First I though of something like

location /web {
  try_files $uri $uri/ /index.php?$args;
 }

but this obviously did not work as the arguments passed to index.php
still contain the /web/   part  , which would have to go.

So I tried instead:

location / {
    rewrite ^/web/(.*)$ /$1;
  try_files $uri $uri/ /index.php?$args;
}

thinking that the first line would modify the URI, taking away the /web/
part so that in the next line the changed uri would be fed to the
try_files command.

But this only resulted in 404s.

Can someone enlighten me on where I am going wrong with this?

Thanks a lot in advance,

Johannes

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to