且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用的conf文件从一个子文件夹重定向URL到另一个/ Ubuntu的

更新时间:2022-12-09 11:23:36

无需重写规则。刚刚成立的别名 /etc/apache2/sites-available/domain.com.conf

No need for Rewrite Rules. Just set up an alias in /etc/apache2/sites-available/domain.com.conf :

<virtualhost *:80>
    ServerName domain.com
    DocumentRoot /var/www/main
    Alias /a/b /var/www/main/a/b/c
</virtualhost>

然后重新启动Apache:

Then restart apache :

$ sudo service apache2 restart