: This article mainly introduces how to make php URLs in Apache not case sensitive. For more information about PHP tutorials, see. The Apache server in Linux is case-sensitive by default. if you do not have a matching php url, it cannot be opened. it is inconvenient to enter the url during the test and is unfriendly to search engines. How can this problem be solved? That is to say, when users enter uppercase letters, they will also jump to the lower-case URL page. Minimize the impact of capital. The specific solution is as follows. for example, Debian and other systems are similar to the following:
All of the following operations require the root permission of sudo.
1. locate speling. load in the path/etc/apache2/mod-available and copy it to the path/etc/apache2/mod-enabled:
2. write the speling. conf file to the/etc/apache2/mod-enabled Directory. the speling. conf content is very simple. I only write one line: CheckSpelling on
Remember to have sudo before the creation. if there is no graphic interface, use vi to play. for details, see [Linux] vi/vim usage (click to open the link)
3. add speling. load and speling. conf to/etc/apache2/mod-enabled, and restart apache. For example, we have configured a test in var/www. php does not have Test. php. obtain the Ubuntu IP address of the VM from the ifconfig on an external client, which is case-insensitive and can also access the test. php
In addition, some Linux systems, such as some CentOS php directory layout are different. you can use the following methods:
1. check whether there is no module mod_speling.so in the system. path:/etc/httpd/modules. if there is a module, directly pass the module. if there is a module, the system does not use it from another place.
2. Edit this module: vi/etc/httpd/conf/httpd. conf. in the module loading area, add the following content:
LoadModule speling_module modules/mod_speling.soCheckSpelling on
Save the changes and exit.
3. restart the httpd service.
The above describes how to make php URLs in Apache no longer case sensitive, including content, and hope to be helpful to friends who are interested in PHP tutorials.