问题描述
所有的首先,我对英语的任何错误道歉
好,我的问题是这样的:
我有了在后端文件夹,并收到以下路径请求
[根] /后端/ WWW (其中包含用于处理请求的index.php文件)
我有了在前端文件夹,并收到以下路径请求
[根] /前端/ WWW (其中包含用于处理请求的index.php文件)
我还一个文件夹命名为通用这是后端和前端之间共享(包含框架的图书馆,以及其他文件)
(我希望你能明白我想要的)
我需要帮助,在某种程度上与做到这一点的的.htaccess 的文件,我不能使用符号连接或子域对于这个问题...
我搜索了很多在谷歌这里,却发现没有什么工作,或谁可以帮我。
PS:我使用Yii框架与YiiBoilerplate,但我认为该解决方案不应该在那里
在此先感谢!
解决,与此code:
RewriteEngine叙述上
的RewriteBase /安德烈/
重写规则^管理(/.*)?$后端/ WWW / index.php文件/ $ 1 [L,NC]
的RewriteCond%{REQUEST_URI} /!(前端|后端)/ [NC]
重写规则^(。*)?$前端/ WWW / index.php文件/ $ 1 [L,NC]
First of all, I apologize for any mistake in English
well, my question is this:
I have a folder that has the backend, and receives requests in the following path
[root]/backend/www(which contains an index.php file that handles requests)
I have a folder that has the frontend, and receives requests in the following path
[root]/frontend/www(which contains an index.php file that handles requests)
I have also a folder named common that is shared between the backend and frontend (contains the libraries of the framework, among other files)
(I hope you can understand what I want)
I need help, on a way to do this with .htaccess file, I can not use Symlinks or Subdomains for this problem...
I've searched a lot in Google and here, but found nothing that worked or who could help me.
PS: I am using Yii Framework with YiiBoilerplate, but I think the solution should not be out there
Thanks in advance!
Solved, with this code:
RewriteEngine On
RewriteBase /andre/
RewriteRule ^admin(/.*)?$ backend/www/index.php/$1 [L,NC]
RewriteCond %{REQUEST_URI} !/(frontend|backend)/ [NC]
RewriteRule ^(.*)?$ frontend/www/index.php/$1 [L,NC]
这篇关于使用的.htaccess处理的后端和前端的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!