0
爲什麼會造成重定向循環?htaccess - 重定向循環
Options +FollowSymlinks
RewriteEngine on
RewriteBase /summary/1/document/
RewriteRule !^[a-z]{2}/ /summary/1/document/en/ [L,R]
RewriteRule ^([a-z]{2})/ ../index.php?lang=$1&type=document
我想實現的是:
如果沒有指定的語言,重定向到英語:
例子:
website.com/summary/1/document --> website.com/summary/1/document/en/
website.com/summary/1/document/fr/ [no redirect]
當被指定的語言,重寫用lang和type參數在../index.php內部。