更改.htaccess后未发布的数据

I am making a website in PHP, everything is working fine, but when I changed the .htaccess file post form method is not posting the data.

.htaccess file (I found this on stackoverflow.com)

#Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

## don't touch /forum URIs
RewriteRule ^forums/ - [L,NC]

## hide .php extension snippet

# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]

# To internally forward /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]

form

 <form method="post" id="form" action="view_images.php">
    <input type="text" name="img" value="images/1.jpg" id="img_name" />
    <input type="submit" id="submit" value="submit" />
</form>

any ideas what is wrong?

This rule:

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]

Is causing your POST request for view_images.php to be redirected to view_images, and thus you lose the request body (all of your POSTed data). You don't want to cause this redirect, so don't POST to the view_images.php URL. Remove the .php part so that it won't redirect:

<form method="post" id="form" action="view_images">
    <input type="text" name="img" value="images/1.jpg" id="img_name" />
    <input type="submit" id="submit" value="submit" />
</form>