Try adding this line on top of your .htaccess:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{THE_REQUEST} /info\.php\?j=([^&]+)&m=([^&\s]+)
RewriteRule ^ /~temp/info/%1/%2/? [R=302,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (?:^|/)info/([^/]+)/([^/]+)/?$ /~temp/info.php?j=$1&m=$2 [L,QSA]
Option MultiViews
is used by Apache's content negotiation module
that runs before mod_rewrite
and and makes Apache server match extensions of files. So /file
can be in URL but it will server /file.php
.