问题
I would like to know how can I configure a subdomain to a website. Example www.domain.com subdomain.domain.com
How can I configure the htaccess to access the folder subdomain and use it
public_html
app
lib
plugins
vendors...
subdomain
app
lib...
this is my htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
thanks
回答1:
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>
来源:https://stackoverflow.com/questions/21151875/htaccess-or-cakephp