Friday, August 26, 2011

Re: third level domain and cakephp

I should have thought a little bit harder before writing that... don't try to make my previously posted .htaccess code work, those paths aren't valid.

This might work a little bit better instead, but I still haven't had a chance to actually test it:

RewriteCond %{REMOTE_HOST} = test.domain.com
RewriteCond %{SCRIPT_URL} !^/test/ 
RewriteRule (.*) /test/$1 [L]

RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]

As long as I'm not making another bone-headed mistake, the above should add /test/ to the URL if you are on the test.domain.com subdomain and if /test/ is not already in the URL... I'm not sure what other side effects this might introduce, however any URL not on the test subdomain should not be affected by the new rules at all.

Ben

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: