0
在我的應用程序的.htaccess
文件我有以下幾點:重寫Apache RewriteRule?
Options -Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) index.php
通過index.php
將所有匹配的請求非常輕巧的檔案。
但是,這個應用程序是一個社交網站,我一直負責製作多語言。因此,像www.example.com/profile/martin
這樣的URL需要轉換成西班牙語,因此會變成www.example.com/perfil/martin
。
因此,我的問題是:是否可以重寫RewriteRule
?在這種情況下,我想重寫/perfil/martin
至/profile/martin
,但之後將/profile/martin
傳遞給index.php
。
真的嗎?我開始這樣做,但認爲在我的應用程序的代碼中有這些字典會變得混亂,難以維護。但是,再一次,沒有比維護'.htaccess'規則更好了。謝謝! – 2010-10-27 11:08:44