博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Ubuntu] how to use url-rewrite in apache2
阅读量:6997 次
发布时间:2019-06-27

本文共 717 字,大约阅读时间需要 2 分钟。

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 

 

 

 

转载地址:http://ruovl.baihongyu.com/

你可能感兴趣的文章
zabbix邮箱告警的详细配置
查看>>
使用基本ACL规则限制用户登录
查看>>
linux 文件查看命令 文件和目录属性
查看>>
由我主讲的软件测试系列视频之性能测试系列视频讲座目录出炉了
查看>>
dropdownlist用法
查看>>
二分查找、二分查找小于等于key的最后一个元素、二分查找大于等于key的第一个元素...
查看>>
PGA的调整建议
查看>>
C#进行Visio二次开发相关事件汇总
查看>>
安装fontconfig2.4.2时make报错解决
查看>>
试析软件测试的错觉及发展方向
查看>>
QTP自动化测试自学手册V2.0版本
查看>>
80后收入是怎样一个水平?看完网友工资单,对不起 拖大家内裤了
查看>>
有关软件测试的五大谣言
查看>>
find(2)
查看>>
jquery-1.4.4.min.js无法解析json中result.data问题
查看>>
php字符串大小写转换
查看>>
linux怎么不输入路径直接运行程序脚本
查看>>
日志信息log
查看>>
扩大VMware虚拟机中CentOS 7的硬盘空间
查看>>
BZOJ2005:[NOI2010]能量采集(莫比乌斯反演,欧拉函数)
查看>>