301 Loop redirection error after removing .php extension in Wordpress -


long time ago... when installed web-site (actually moved drupal wordpress) decided not change links , leave them is. have .php extension (in settings of links have /%postname%.php plus use .php page plugin). trying remove .php , make 301 redirection using .haccess.

first change settings /%postname%.php /%postname%, disable ".php page" plugin... redirection doesn't work, gives me loop redirection problem... idea how fix it?

p.s. loop happens when removing .php, if don't remove .php link settings pages redirects 404

# remove filename extension rewriteengine on rewritebase /

# externally redirect /dir/abc.php /dir/abc rewritecond %{the_request} ^[a-z]{3,}\s/+(.+?)\.php[\s?] [nc] rewritecond %{request_uri} !^/wp-admin [nc] rewriterule ^ /%1 [r=301,l,ne]  rewritecond %{request_filename} !-d rewritecond %{request_filename}.php -f rewriterule ^([^\.]+)/?$ $1.php [qsa,nc,l] 


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -