zoukankan      html  css  js  c++  java
  • [Ubuntu] how to use urlrewrite in apache2

    just follow the steps below:

    First step: 

    sudo vim /etc/apache2/sites-available/default

    Modify the code from

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    to

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

     <Directory />

        Options FollowSymLinks
        AllowOverride All
    </Directory>

    Second step:

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

    sudo ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load

    sudo ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load

    Then restart the apache2:

    sudo /etc/init.d/apache2 restart

    you now can use .htaccess to achieve the url rewrite 

  • 相关阅读:
    数据--第53课
    数据--第52课
    数据--第51课
    标准模板库中的优先队列(priority_queue)
    进程的定义
    进程的基本概念
    循环不变式
    插入排序
    模板声明
    标准模板库中的队列(queue)
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/2183683.html
Copyright © 2011-2022 走看看