search

Home  >  Q&A  >  body text

apache - How to enable mod_rewrite

Confused. What is mod_rewrite? Does anyone have any reference cases?

phpcn_u1582phpcn_u15822809 days ago635

reply all(1)I'll reply

  • 某草草

    某草草2017-05-16 17:00:01

    First you need to turn apache的配置文件httpd.conf中的mod_Rewrite on, as follows

    LoadModule Rewrite_module libexec/mod_Rewrite.so

    Then the configuration reference is as follows

    <IfModule mod_Rewrite.c>
    RewriteEngine On
    RewriteRule 添加你要的规则
    RewriteRule 添加你要的规则
    RewriteRule 添加你要的规则
    RewriteRule 添加你要的规则
    ...
    </IfModule

    reply
    0
  • Cancelreply