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 

 

 

 

相关文章:

  • 2021-11-14
  • 2022-12-23
  • 2022-01-16
  • 2021-07-19
  • 2021-09-12
  • 2021-12-25
  • 2021-12-30
  • 2022-01-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-04-21
  • 2021-10-25
  • 2021-07-02
  • 2021-09-29
相关资源
相似解决方案