Simple RewriteRule

I am trying with a simple RewriteRule in apache.
Apache is installed in /var/www/folder3
I have a web-app in folder3 and has files index.php, file2.php.

My requirement is not to show original php file.

That is if index.php is accessed, it should show index.po/index.html
If file2.php is accessed, it should show file2.po/file2.html

Inside the root directory, I have .htaccess file. and its contents are

RewriteEngine On
RewriteRule     .*      index.php [L]

And in the http.conf file, I have

<Directory /var/www/file2>
Order deny,allow
RewriteEngine On
</Directory>

Please help :wall:

Is file2 a directory or a file name fragment?

URL Rewriting for Beginners | Alone On A Hill looks good.

What is file name fragment ? (:wall:)

file2.php is file in disk.

filw2.po is a directory, then?

You need to have a rewrite rule that translates the simple URI to the other, longer URI, providing that directory.

The line in the 1st post for file2.po/file2.html indicates OR

And file2.po is not a directory.

Well, to the outside world the rewrite would make it seem file2.po is a directory?