• support@answerspoint.com

CakePHP, .htaccess and subdomain not working together

1019

I have the following directory tree in public_html folder:

/app /test /cake ...

/app if the Application folder for my site and /test is a subdomain.

The problem is that I've changed the .htaccess, my site is working but the subdomain is returning a 500 error.

My .htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$ app/webroot/    [L]
    RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

Thanks.

1Answer


0

Try this to solve problum:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com$
RewriteRule    ^$ app/webroot/    [L]
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com$
RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>
  • answered 2 years ago
  • Community  wiki

Your Answer

    Facebook Share        
       
  • asked 2 years ago
  • viewed 1019 times
  • active 2 years ago

Hot Questions