What is the main motive to set enableStrictParsing for UrlManager into true?

For what user cases?

I’m pretty sure the main reason is to prevent the use of non-semantic urls.

$enableStrictParsing works only with $enablePrettyUrl == true and the latter means that the urls are already semantic, so it is not the option.

As I understood so far enableStrictParsing prevents the situation when the page are accessible both by its "outer" and "inner" addresses which is by default and no SEO friendly.

Sure, that’s exactly what I said. Just love the word ‘semantic’, it makes things look complicated and significant.

hey guys! just read your discussion.

Could you please provide some information about what you call "inner" and "outer" addresses used by default?

Is it all about accessing the same resource by ?r=controller/action and /controller/action URLs when enablePrettyUrl and enableStrictParsing both set to true? (which really doesn’t look “semantic”)

If so - I’ve just tested such setup and it looks like turning on enablePrettyUrl parameter just disables any ?r=… routes parsing. So what’s the real case that could be prevented by enableStrictParsing?

It doesn’t prevent them either, it won’t throw an exception on ?r=… urls, and and the variables can be passed to controller via query string. enableStrictParsing requires the routes to be specified explicitly.