php - How to send parameters when redirect happens by htaccess

736

I'm using htaccess to change my url to remove .php from url.

for example to change: www.example.com/insert.php to www.example.com/insert but when it happens the posted parameters doesn't exist in redirected request. "i'm using post method to send data to insert.php" How to solve this issue?

  RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
  RewriteRule ^ /%1 [NC,L,R]
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^(.*?)/?$ /$1.php [NC,L]

People are also looking for solutions to the problem: facebook webhook not verifying php

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.