form submission in apache rewritten page in php
<p>My problem is as follows</p>

<p>I am constructing a website that displays photos and allows visitors to post a comment.</p>

<p>All the pages of my website are rewritten using apache mod_rewrite,
HTML code  in my page is:</p>

<pre><code>&lt;form action="&lt;?php echo $_SERVER['REQUEST_URI']; ?&gt;" method="POST"&gt;
</code></pre>

<p>The url of page showing photo is <code>mydomain.com/photo/23/</code> which is rewritten form of mydomain.com/photo.php?id=23,
when i submit the form,it takes me to the page <code>mydomain.com/photo/23/photo.php?id=23</code> and shows me Page not found error.
But when i go back to <code>mydomain.com/photo/23/</code> i see the previously submitted comment.
How can i fix this problem.</p>
