Apache 常用伪静态配置

1. /a/b?c=d => index.php?_a=a&_m=b&c=d

2. /xxx/detail-yyy.html => index.php?_a=xxx&_m=detail&id=yyy

RewriteEngine On

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^$ index.php?_a=index&_m=index&%1 [L]
RewriteEngine On RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^([0-9a-zA-Z]*)$ index.php?_a=$1&_m=index&%1 [L]
RewriteEngine On RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^([0-9a-zA-Z]*)/([0-9a-zA-Z]*)$ index.php?_a=$1&_m=$2&%1 [L] RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^([0-9a-zA-Z]*)/detail-([0-9]*)\.html$ index.php?_a=$1&_m=detail&id=$2&%1 [L]

  

上一篇:iOS中的预编译指令的初步探究


下一篇:Linux 运行进程实时监控pidstat命令详解