Under the Zend Framework, I have a directory structure like this:
Index: /domains/example.com/public_html/public/index.php
Blog index: /domains/example.com/public_html/blog/index.php
In my .htaccess file, shown below is the piece that points to the homepage - this works fine:
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ /public/index.php [NC,L]
I have enabled a subdomain in my host admin control panel and now I want to add a blog which is accessible via: blog.example.com
I tried adding:
RewriteCond %{HTTP_HOST} = ^RewriteRule /blog/(.*) [L,R=301]
RewriteCond %{HTTP_HOST} = ^blog\.example\.com$
RewriteRule ^.*$ /blog/index.php [L]
but this produces a dreaded "Internal Server Error - 500" when navigating to blog.example.com, example.com/blog and even example.com..
I suspect that it could be a complication with the Zend Framework that's causing grief. What should I add / edit in .htaccess for blog.example.com to point correctly ?
Please & thank you.
Index: /domains/example.com/public_html/public/index.php
Blog index: /domains/example.com/public_html/blog/index.php
In my .htaccess file, shown below is the piece that points to the homepage - this works fine:
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ /public/index.php [NC,L]
I have enabled a subdomain in my host admin control panel and now I want to add a blog which is accessible via: blog.example.com
I tried adding:
RewriteCond %{HTTP_HOST} = ^RewriteRule /blog/(.*) [L,R=301]
RewriteCond %{HTTP_HOST} = ^blog\.example\.com$
RewriteRule ^.*$ /blog/index.php [L]
but this produces a dreaded "Internal Server Error - 500" when navigating to blog.example.com, example.com/blog and even example.com..
I suspect that it could be a complication with the Zend Framework that's causing grief. What should I add / edit in .htaccess for blog.example.com to point correctly ?
Please & thank you.