WordPress.org

Ready to get started?Download WordPress

Forums

Custom Contact Forms with redirect code (1 post)

  1. megann_cr42
    Member
    Posted 1 year ago #

    I have this code to redirect links from example.com/about.php to example.com/about/. This code works great, but the forms aren't submitting. What should I be excluding so that the forms can be submitted.

    RewriteCond %{THE_REQUEST} ^(GET|HEAD|POST)\ /(.*)\.php($|\ )
    RewriteCond %{REQUEST_URI} !wp-login
    RewriteRule ^ /%2/ [L,R=301]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} ^/(.*?)/?$
    RewriteCond %{DOCUMENT_ROOT}/%1.php -f
    RewriteRule ^ /%1.php [L]

Topic Closed

This topic has been closed to new replies.

About this Topic