On 10/7/07, Tomek Lorek <tlorek@xxxxxxxxx> wrote: > Hi there! > I'm having problems setting up a mod_rewrite on Apache 2.2.3. I have > an address like this: http://127.0.0.1/~tomek/somesite/register.php > and it works ok. I've got a /home/tomek/public_html/somesite/.htaccess > file which contains: > RewriteEngine On > RewriteRule ^(.+)\.html$ $1.php [L] > The rule in this special example is simple (my target one is much more > complicated but that's not the problem): it should substiture html > with php and that's all. But when requesting this uri: > http://127.0.0.1/~tomek/somesite/register.html (HTML instead of PHP) I > get this 404 error: "The requested URL /home/tomek/public_html/ > somesite/register.php was not found on this server." > So mod_rewrite successfully replaced html with php but Apache > converted this uri to the filesystem path, don't know why. By the way > the file do exists on the filesystem. Since your doing this per-dir (rather than the simpler server-level config), you'll need to set an appropriate RewriteBase. Joshua. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx