2010-12-17 97 views
0

我有一些問題試圖設置.htaccess按照我想要的方式有Magento URL。與.htaccess重寫的幫助

我想重定向的URL,像這樣:

  • domain.com/fr/store從 domain.com/store?__store=france
  • domain.com/fr負荷從 domain.com/store/category.html?__store=france /store/category.html 負載
  • domain.com/store/category/product.html?__store=france

這裏domain.com/fr/store/category/product.html 負荷是我到目前爲止有:

RewriteRule ^fr/store(.*)$ /store/$1?___store=france [L,P] 

它的工作原理重定向到主存儲,但我無法訪問子目錄或頁面。

回答

0

^(.*)$模式捕獲當前的URI,不管它在位置欄還是內部重定向。其中一個解決辦法應該工作:

  • 把子域重定向第一
  • 更換$1有一個變量,例如%{REQUEST_URI}

此答案複製自this answer;它最初由用戶ÁlvaroG. Vicario編寫。