URL Question
gforcesbarry opened this issue · comments
HI,
This is actually a question and not an issue but could not find anyhere to send them.
Reading through the documentation about the file / folder structure it looks like for a backend and front end structure you would need 2 URL's in apache pointing to the relevant /www folders.
EG:
www.site.com -> /frontent/www
admin.site.com -> /backend/www
Our current websites are currently set up as follows:
www.site.com = frontend
www.site.com/edit = backend
Is there a preferred way to get aound this:
Our possible solutions so far are:
- send apache to point to / then add a .htaccess to run the relevant file based on the URL.
As you can imagine this is will not be ideal as it will expose files.
- Create symbolic link within /frontend/www called edit to point to /backend/www
Then include .htaccess file to deal with the routing
Thanks
Barry
Interesting too. Only right way is creating subdomain for backend part? Need live example.
I have the same problem... Any ideas?
- Edit: Symbolic link is working for me:
user@server:/var/www/site/frontend/www# sudo ln -s /var/www/site/backend/www/ admin
You need to have a ssh account for the server to create a symbolic link.
i am using virtual host on local and subdomains on live server for yii-boilerplate.
like, on local:
admin.boilerplate.dev (for backend) and
members.boilerplate.dev (for frontend)
On live admin.boilerplate.com and members.boilerplate.com
working perfect for me.
YiiBoilerplate is designed for the systems where you can define two separate domains using your web server of choice. Frontend and backend are completely distinct web sites sharing the common codebase. It was done to enforce the security between the admin and public sides of the whole application.
Most possibly you'll not be able to utilize YiiBoilerplate in shared hosting environment.