App::themePath('Front');
Friday, January 10, 2014
cakephp subdomain htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
# http|https www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^(.*)$ http%1://domain.com/$1 [R=301,L]
# redirect all subdomains
RewriteCond %{HTTP_HOST} !^domain\.(.*)$ [NC]
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ /%{HTTP_HOST}/$1 [NC,L,NS]
RewriteCond %{HTTP_HOST} ^domain\.(.*)$ [NC]
RewriteRule ^$ app/webroot/ [L]
RewriteCond %{HTTP_HOST} ^domain\.(.*)$ [NC]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
/public_html/sub1.domain.com/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^/%{HTTP_HOST}
RewriteRule ^%{HTTP_HOST}(.*)$ /$1
RewriteCond %{HTTPS} on
RewriteRule ^$ %{HTTP_HOST}/app/webroot/ [L]
RewriteCond %{HTTPS} on
RewriteRule (.*) %{HTTP_HOST}/app/webroot/$1 [L]
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
/public_html/sub1.domain.com/app/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
/public_html/sub1.domain.com/app/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ %{HTTP_HOST}/index.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
RewriteEngine on
RewriteBase /
# http|https www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^(.*)$ http%1://domain.com/$1 [R=301,L]
# redirect all subdomains
RewriteCond %{HTTP_HOST} !^domain\.(.*)$ [NC]
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ /%{HTTP_HOST}/$1 [NC,L,NS]
RewriteCond %{HTTP_HOST} ^domain\.(.*)$ [NC]
RewriteRule ^$ app/webroot/ [L]
RewriteCond %{HTTP_HOST} ^domain\.(.*)$ [NC]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
/public_html/sub1.domain.com/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^/%{HTTP_HOST}
RewriteRule ^%{HTTP_HOST}(.*)$ /$1
RewriteCond %{HTTPS} on
RewriteRule ^$ %{HTTP_HOST}/app/webroot/ [L]
RewriteCond %{HTTPS} on
RewriteRule (.*) %{HTTP_HOST}/app/webroot/$1 [L]
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
/public_html/sub1.domain.com/app/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
/public_html/sub1.domain.com/app/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ %{HTTP_HOST}/index.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
Subscribe to:
Posts (Atom)