虚拟主机文档根访问以前的文件夹

如何通过不包含在虚拟主机文档根目录中的index.html访问以前的文件夹。

例如:

<VirtualHost *:443> DocumentRoot /var/www/banking/personal-banking ServerName www.zbux.com ErrorLog /var/log/apache2/www.zbux.com-error.log CustomLog /var/log/apache2/www.zbux.com-ssl_access.log combined SSLEngine on SSLCertificateFile /etc/ssl/certs/zbux_com.crt SSLCertificateChainFile /etc/ssl/certs/zbux_com.ca-bundle SSLCertificateKeyFile /etc/ssl/private/zbux.com.key </VirtualHost> 

个人银行文件夹中包含index.html,该文件需要访问银行文件夹中的文件夹bak。

你可以在虚拟主机中使用别名。 将下面的行添加到您的虚拟主机。

别名/ parentdir / var / www / banking /

现在“银行”文件夹下的目录可以使用下面的链接访问

 http://www.zbux.com/parentdir/bak http://www.zbux.com/parentdir/bak/1.html 

遵循这个: https : //stackoverflow.com/questions/15411978/how-to-redirect-user-from-php-file-back-to-index-html-on-dreamhost

在那里我写了一个index.html文件并将其上传到/ banking文件夹中。