<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font face="Calibri">Dear all,</font></p>
<p><font face="Calibri">in order to have prettier URLs I have decided
to move my joomla from /web/ to /, but I want old URLs to
transparently redirect. <br>
</font></p>
<p><font face="Calibri">I am struggling how to do this. <br>
</font></p>
<p><font face="Calibri">First I though of something like <br>
</font></p>
<p><font face="Calibri">location /web {<br>
try_files $uri $uri/ /index.php?$args;<br>
}<br>
</font></p>
<p><font face="Calibri">but this obviously did not work as the
arguments passed to index.php still contain the /web/ part ,
which would have to go.<br>
</font></p>
<p><font face="Calibri">So I tried instead:<br>
</font></p>
<p><font face="Calibri">location / {<br>
rewrite ^/web/(.*)$ /$1;<br>
try_files $uri $uri/ /index.php?$args;<br>
}<br>
</font></p>
<p><font face="Calibri">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.</font></p>
<p><font face="Calibri">But this only resulted in 404s.</font></p>
<p><font face="Calibri">Can someone enlighten me on where I am going
wrong with this?</font></p>
<p><font face="Calibri">Thanks a lot in advance,</font></p>
<p><font face="Calibri">Johannes<br>
</font></p>
</body>
</html>