简体   繁体   English

Nginx服务器的重写规则

[英]Rewrite Rules for nginx Server

So instead of using the http://www.domain.com/index.php?q=keyword which don't look really nice, I want to use http://www.domain.com/keyword which looks much nicer 因此,而不是使用的http://www.domain.com/index.php?q=keyword不看真的很好,我想用http://www.domain.com/keyword看起来更漂亮

Can anyone help me with the url rewrite rule for nginx? 谁能帮我提供有关nginx的URL重写规则?

  rewrite ^/(.*) /index.php?q=$1 break;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM