I currently have the following in a .htaccess file to rewrite the .php extention:
# /var/www/html/help/.htaccess
# To externally redirect /dir/foo.php to /dir/foo excluding POST requests
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R=302,L,NE]
# To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
Which works as expected. However I'm looking to add some additional rewrites, such as redirecting /help/open to /help/submit. Everything I've tried seems to end with infinite redirects from /help/open -> /help/submit and back.
RewriteRule open.php /help/submit [R=302,NE,L]
RewriteRule submit /help/open.php [L]
Can someone advise how I could implement additional URL rewrites here without resulting in infinite loops?