2012-03-31 100 views
1

我在htaccess的得到这个URL重写使用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] 

,一切工作正常execpt的/records/records/重写

任何想法?我不能让它工作

+0

的规则看起来是正确的。它做错了什么? 404? – VoteyDisciple 2012-03-31 15:25:49

+0

是的,我得到404 – Zuker 2012-03-31 15:29:20

回答

1

请尝试这一个。而且可以肯定的是records.php同一目录与htaccess

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]