From:http://www.111cn.net/phper/thinkphp/57748.htm
First, in the configuration file opened the Thinkphp case recognition feature, so that the link case can be accessed normally:
' Url_case_insensitive ' =>true
The file name is canonical, but the URL is not properly obtained when using __url__ in the template to get the current URL path.
This is written in the manual:
There is a place to note that if we define a Usertypeaction module class, then the URL should be accessed:
Http://serverName/index.php/user_type/list
Instead of
Http://serverName/index.php/usertype/list
The link to use __url__ in the template is the one below, not underlined.
Second, the solution is to modify the source of TP:
In the Dispatcher.class.php file under the core folder of the Lib folder of TP, find 181 rows, here define the __url__ address to get the way:
Code to copy code as follows
$moduleName = defined (' Module_alias ')? Module_alias:module_name;
if (define (www.111cn.net) d (' group_name ')) {
Define (' __url__ ',!empty ($domainModule)? __group__. $depr: __group__. $depr. ( C (' url_case_insensitive ')? Strtolower ($moduleName): $moduleName));
}else{
Define (' __url__ ',!empty ($domainModule)? __app__. ' /': __app__. ' /‘. (C (' url_case_insensitive ')? Strtolower ($moduleName): $moduleName));
}
Put one of the C (' url_case_insensitive ')? Strtolower ($moduleName): $moduleName) changed to:
Code to copy code as follows
C (' url_case_insensitive ')? Parse_name ($moduleName, 0): $moduleName
That's OK!
Thinkphp supports case-sensitive URL address access without underlining