根据参数重定向页面的规则

时间:2015-08-20 21:50:57

标签: .htaccess

根据参数重定向页面的规则是什么?

例如:

我想:Cannot implicitly convert type 'string' to 'System.Collections.Generic.List<string>'重定向到domain.com/en

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

您可以使用此规则:

RewriteEngine On
RewriteBase /

# If the request is not for a valid directory
RewriteCond %{REQUEST_FILENAME} !-d
# If the request is not for a valid file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)/?$ ?lang=$1 [L,QSA]
相关问题