使用htaccess和虚拟子文件夹重写URL


URL rewrite using htaccess and virtual subfolders

我在htaccess 中有这个

RewriteEngine On
RewriteRule ^records$ records.php [L]
RewriteRule ^records/$ records.php [L]
RewriteRule ^records/pro$ records_pro.php [L]
RewriteRule ^records/pro/$ records_pro.php [L]
Rewriterule ^records/pro/player/(.*?).html$ records_mpro.php?name=$1 [L]
Rewriterule ^records/pro/map/(.*?).html$ records_mapro.php?map=$1 [L]
RewriteRule ^records/pro/totales$ records_qpro.php [L]
RewriteRule ^records/pro/totales/$ records_qpro.php [L]

执行/records/records/重写时一切正常

有什么想法吗?我无法使它工作

请试试这个。并确保records.phphtaccess 是同一目录

RewriteEngine On
Rewriterule ^records/pro/player/(.*?).html$ records_mpro.php?name=$1 [L]
Rewriterule ^records/pro/map/(.*?).html$ records_mapro.php?map=$1 [L]
RewriteRule ^records/pro/totales(/?)$ records_qpro.php [L]
RewriteRule ^records/pro(/?)$ records_pro.php [L]
RewriteRule ^records(/?)$ records.php [L]