2012-03-31 72 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]