我想在Apache2中创建一个文件夹的别名(使用centos 6和PHP5.4)。我的想法是将项目从一台服务器迁移到另一台服务器。
示例:
htaccess的:
SetAlias /home/before.com/ /home/after.com/
PHP
include( '/home/before.com/header.php' );//include header from "/home/after.com/"
谢谢!
答案 0 :(得分:1)
这是错误的做法。请参阅文档:http://httpd.apache.org/docs/current/mod/mod_alias.html
您也无法在.htaccess中设置别名。