The so-called clear urls is like www.drupal.com /? Q = admin is converted to www.drupal.com/admin?this is a good solution for both of them. One is easier to get searched by the engine, and the other is, of course, easy to pull. Haha
If apache is used as the http server, you can directly enable clear urls on drupal,
Administration-> Configureation-> Search and metadata-> Clean URLs, and then directly enable it.
If you are an nginx server, you need to write some content in the configuration file to simulate the apache forwarding function, and add the following content in the server segment.
Server {
Listen 80;
...
Location /{
Index index.html index.htm index. php;
Try_files $ uri @ rewrite;
}
Location @ rewrite {
Rewrite ^/(. *) $/index. php? Q = $1;
}
...
}
1. Create a section of location @ rewrite, describe the forwarding rule, and 2. Add the try_files statement using the forwarding rule in the location/section. Restart nginx and enable it in drupal. clear urls Functions