的.htaccess(或+ CakePHP的) [英] Htaccess ( or + Cakephp)
本文介绍了的.htaccess(或+ CakePHP的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道我怎么可以配置一个子域到一个网站。 例 www.domain.com subdomain.domain.com
I would like to know how can I configure a subdomain to a website. Example www.domain.com subdomain.domain.com
我如何配置htaccess的访问文件夹的子域,并用它
How can I configure the htaccess to access the folder subdomain and use it
public_html
app
lib
plugins
vendors...
subdomain
app
lib...
这是我的htaccess
this is my htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
感谢
推荐答案
在的public_html / htaccess的:
in public_html/.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !subdomain/
RewriteRule ^$ app/webroot/ [L]
RewriteCond %{REQUEST_FILENAME} !subdomain/
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
这篇关于的.htaccess(或+ CakePHP的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文