I produced personal files .htaccess within the /var/world wide web directory. The privileges are "root root --wxrwxrwxr".

This content from the file is:

Options +FollowSymlinks
RewriteEngine on
RewriteLogLevel 3
RewriteLog "/var/log/apache2/rewrite.log"
RewriteRule ^(.*?)$ testphp.php

After I call the page phpinfo.php, I have got: Loaded Modules ... mod_rewrite ... Therefore, the modules is loaded.

After each modification, I restared the server by hand with sudo /etc/init.d/apache2 restart.

The mistake.record gives

Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.2 with Suhosin-Patch set up -- returning to normal procedures

After I call a webpage anybody.htm or anybody.php, the rewrite.log does contain nothing and also the real page is known as. Basically understand, the page anyone.php ought to be changed by testphp.php

Did I make siomething wrong?

Thanks

Basically were an internet server, i'd ignore any config file which was world writable, for stability and security's sakes. I understand there's places in Apache which do just that i forget whether .htaccess processing is just one of individuals places, but i'd assume/hope it's.

Interesting help

Here's what I made to obtain the Apache2 server running using the Rewrite Rule:

  1. I re-installed the server from the new hard disk drive
  2. I triggered the Rewrite with 'sudo a2enmod rewrite'
  3. I produced the file '.htaccess' using the rules:

    RewriteEngine On
    RewriteRules ^(.*)$ test.php
    

Within the "/etc/apache2/sites-available/default", I put in your directoryOr

AllowOverride all
Order deny,allow
Allow from all

as well as in your directory "/var/www", exactly the same 2 lines. I'm not sure why, however the rules RewriteLog n doesn't word within the .htaccess. Within the "/var/www", I produced 2 files, index.html (the default) and test.php. The exam.perl consists of

<?php phpinfo(); ?>

After I call the page index.html, the php info is displayed

Once more, thanks.