[英]Site in site apache2
Hi all! 大家好!
I have old site on clear php, new functionality start writing on Yii2. 我在清晰的php上有旧网站,新功能开始在Yii2上编写。
-- old site
|
-- index.php (old site)
|
-- yii2
|
-- web
|
-- index.php (new site)
I need to configure all request on 我需要配置所有请求
site.ll/* -> index.php (old site) site.ll / *-> index.php(旧站点)
site.ll/v2/* -> yii2/web/index.php (new site) site.ll / v2 / *-> yii2 / web / index.php(新站点)
I trying like this: Alias /v2 /srv/site/yii2/web 我尝试这样: Alias / v2 / srv / site / yii2 / web
Alias is not ported on Nginx, but I need to run this configuration on apache and on nginx. 别名未移植到Nginx上,但我需要在apache和nginx上运行此配置。
Thanks! 谢谢!
Just using rewrites: 仅使用重写:
RewriteRule v2/*?$ /srv/old_site/yii2/web/index.php [NC,L]
RewriteRule v2/*?(.*)?/?$ /srv/old_site/yii2/web/index.php/$1 [NC,L]
RewriteRule v2/*?(.*)?/?(.*)?$ /srv/old_site/yii2/web/index.php/$1/$2 [NC,L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.