How to enable mod_rewrite for Apache 2.2

后端 未结 15 1320
渐次进展
渐次进展 2020-11-21 07:09

I\'ve got fresh install of Apache 2.2 on my Vista machine, everything works fine, except mod rewrite.

I\'ve uncommented

LoadModule rewrite_module mo         


        
相关标签:
15条回答
  • 2020-11-21 07:34

    In Ubuntu:

    Run:

    a2enmod rewrite
    

    and then:

    service apache2 restart
    

    mod_rewrite will now be enabled!

    0 讨论(0)
  • 2020-11-21 07:35

    I just did this

    sudo a2enmod rewrite
    

    then you have to restart the apache service by following command

    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-11-21 07:38

    What worked for me (in ubuntu):

    sudo su
    cd /etc/apache2/mods-enabled
    ln ../mods-available/rewrite.load rewrite.load
    

    Also, as already mentioned, make sure AllowOverride all is set in the relevant section of /etc/apache2/sites-available/default

    0 讨论(0)
提交回复
热议问题