更新时间:2023-09-12 08:19:46
您只能指定的 URL路径在 重写规则
,.htaccess文件中只是没了上下文路径preFIX的URL路径(在本例的情况下, /
)。所以:
You can only specify the URL path in RewriteRule
, in case of the .htaccess file only the URL path without the contextual path prefix (in this case /
). So:
RewriteRule ^msc3/fr http://example.com/msc3/fr/index_fr
请注意,这将匹配的路径中的任何URL只是开始的有 / MSC-3 / FR
为 ^
标记字符串的开始。
Note that this will match any URL that’s path just begins with /msc3/fr
as ^
marks the start of the string.