On my site I use htaccess url rewriting to remove php extensions completly from php files.
Php extension gets removed completly, /file.php maps to /file.
My problem is that php forms with POST method stop working when remove php rule is active.
I am using :
action="<?php echo $_SERVER["PHP_SELF"]?>"
in action attribute of forms.
I am sure that this is not a htaccess or browser cache related issue because My htaccess regex is matching against both methods GET|POST. and I am using 302 to redirect.
My form url is /signup.php, It chages to /signup when I type /signup.php, Do I need to replace PHP_SELF with /signup in action attribute?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…