La regola che ti ho scritto prevedeva un id numerico, con &quot;mondo&quot; non può funzionare.<br><br><span class="q">RewriteRule test/([^\.]+)\.html test.php?id=$1<br>dovrebbe andare.<br><br>Il file .htaccess è nella stessa directory di 
test.php vero?<br>E, per scaramanzia, i permessi sul file test.php sono corretti? Cioè, apache può accedervi?<br><br>Martino<br></span><br><div><span class="gmail_quote">On 8/16/06, <b class="gmail_sendername">Massimo Sandolo
</b> &lt;<a href="mailto:bastilani@email.it">bastilani@email.it</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="">
<br><div><div>Il giorno 15/ago/06, alle ore 23:41, Martino di Filippo ha scritto:</div></div><div><span class="q"><br><blockquote type="cite">Ho capito dove sta il problema.<br>Inoltre, c'è almeno un errore, seppur triviale, oltre al fatto che non capisco bene l'uso di [^/] (perchè mai usare &quot;un carattere diverso da /&quot; quando l'id non è terminato da &quot;/&quot;? visto che l'url è nella forma test/ID.html, sarebbe più corretto usare [^\.]+\.html)&nbsp;
<br></blockquote><div><br></div></span></div><div><div>questo tipo di regola l'avevo presa da un tutorial su un forum, che era data come prova per verificare il funzionamento del rewrite.. non mi sono soffermato troppo sulla correttezza dell'espressione :P
</div></div><div><span class="q"><br><blockquote type="cite">Comunque, venendo al nocciolo della questione, il browser mostra il nuovo indirizzo perchè stai dando un url completo di http:// come rewrite, dovresti usare un url relativo alla directory corrente:
<br><br>RewriteRule test/(\d+)\.html text.php?id$1<br></blockquote><div><br></div></span></div><div>ok, in effetti tutti fanno riferimento a questo tipo di regole (senza url completo), però in realtà se non specifico l'url completo lui mi da un 404.
</div><div>Cmq con la tua regola chiedendo la pagina&nbsp;</div><div><font size="3"><span style="font-size: 12px;"><a href="http://localhost/%7Emassimo/prova_rewrite/test/mondo.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://localhost/~massimo/prova_rewrite/test/mondo.html</a></span></font></div><div><font size="3"><span style="font-size: 12px;">ottengo:</span></font></div><div style="margin: 0px;"><font size="3"><span style="font-size: 12px;">
Not Found</span></font></div><div style="margin: 0px;"><font size="3"><span style="font-size: 12px;">The requested URL /~massimo/prova_rewrite/test/mondo.html was not found on this server.</span></font></div><div><font size="3">
<span style="font-size: 12px;"><br></span></font></div><div><font size="3"><span style="font-size: 12px;"><br></span></font></div><div><font size="3"><span style="font-size: 12px;">invece con la regola precedente:</span></font>
</div><div>RewriteRule test/([^/]+).html test.php?id=$1 [L]<font size="3"><span style="font-size: 12px;"></span></font></div><div><br></div><div><font size="3"><span style="font-size: 12px;"><font size="3"><span style="font-size: 13px;">
richiamando:&nbsp;<font size="3"><span style="font-size: 12px;"><a href="http://localhost/%7Emassimo/prova_rewrite/test/mondo.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://localhost/~massimo/prova_rewrite/test/mondo.html
</a></span></font></span></font></span></font></div><div><font size="3"><span style="font-size: 12px;"><font size="3"><span style="font-size: 13px;">mi restituisce:</span></font></span></font></div><div style="margin: 0px;">
<font size="3"><span style="font-size: 12px;">Not Found</span></font></div><div style="margin: 0px;"><font size="3"><span style="font-size: 12px;">The requested URL /Users/massimo/Sites/prova_rewrite/test.php was not found on this server.
</span></font></div><div style="margin: 0px;"><font size="3"><span style="font-size: 12px;"><br></span></font></div><div style="margin: 0px;"><font size="3"><span style="font-size: 12px;">nel primo caso non riscrive, nel secondo invece il path sarebbe corretto perchè il file 
test.php è proprio in quella directory, solo che lo traduce in path e non in url</span></font></div><div></div><div><span class="q"><br><blockquote type="cite">(Nota che il . prima di html, se non preceduto da un backslash, indica &quot;un carattere qualsiasi&quot; e non un punto effettivo. L'espressione funziona comunque perchè un punto è &quot;un carattere qualsiasi&quot;, ma tanto vale essere precisi. 
<br>In più, visto che gli id sono numerici, puoi usare \d+ (che indica una serie di cifre) al posto di [^/]+.)<br></blockquote><div><br></div></span></div><div>capito!</div><div><span class="q"><br><br><blockquote type="cite">
Spero che sia tutto chiaro!<br>Martino<br></blockquote><br></span></div><div></div>byez<br><div>max</div></div>
</div><br>_______________________________________________<br>Tecnica mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Tecnica@liste.siena.linux.it">Tecnica@liste.siena.linux.it</a><br>
<a style="border-bottom-style: groove;" onclick="return top.js.OpenExtLink(window,event,this)" href="http://liste.siena.linux.it/cgi-bin/mailman/listinfo/tecnica" target="_blank">http://liste.siena.linux.it/cgi-bin/mailman/listinfo/tecnica
</a><br><br><br></blockquote></div>