如何为单个页面创建一个规则覆盖规则?

时间:2018-02-23 08:16:39

标签: .htaccess

我有:

    RewriteRule ^for-auto.html index.php?show=for-auto [L]
    RewriteRule ^for-home.html index.php?for=dla-home [L]
    RewriteRule ^cleaning-service.html index.php?show=cleaning-service [L]

如何为上述所有页面创建一条规则?

1 个答案:

答案 0 :(得分:0)

您可以尝试此规则:

RewriteRule ^(.+)\.html$ index.php?show=$1 [L,NC]

参考:http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule

希望这能帮到你!