How to enable mod_rewrite for Apache 2.2

后端 未结 15 1361
渐次进展
渐次进展 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:24

    There are many ways how you can fix this issue, if you know the root of the issue.

    Problem 1

    Firstly, it may be a problem with your apache not having the mod_rewrite.c module installed or enabled.

    For this reason, you would have to enable it as follows

    1. Open up your console and type into it, this:

      sudo a2enmod rewrite

    2. Restart your apache server.

      service apache2 restart

    Problem 2

    1. You may also, in addition to the above, if it does not work, have to change the override rule from the apache conf file (either apache2.conf, http.conf , or 000-default file).

    2. Locate "Directory /var/www/"

    3. Change the "Override None" to "Override All"

    Problem 3

    If you get an error stating rewrite module is not found, then probably your userdir module is not enabled. For this reason you need to enable it.

    1. Type this into the console:

      sudo a2enmod userdir

    2. Then try enabling the rewrite module if still not enabled (as mentioned above).

    To read further on this, you can visit this site: http://seventhsoulmountain.blogspot.com/2014/02/wordpress-permalink-ubuntu-problem-solutions.html

提交回复
热议问题