hi guys I've build a website using the zend framework and using clean urls - however I need to set up a subdomain such that it points to only one folder on my website i.e I want the subdomain admin.mysite.com
to point to mysite.com/admin
and I wanna do it using my htaccess file
EDIT -------
This is my htaccess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
RewriteRule !\.(js|ico|gif|jpg|png|css|htm|html)$ index.php
RewriteCond %{REQUEST_URI} !^/admin
RewriteCond %{HTTP_HOST} ^admin
RewriteCond %{REQUEST_URI} !^/admin
RewriteRule ^(.*)$ admin/$1 [L]
AddType text/css .css
AddHandler php5-script .php
on subdomain admin.mysite.com use directive Redirect.
Or you can use proxy:
Try something like this above your existing URL rerwites:
Edit: To prevent it from being interpreted as a Zend Frameowrk controlleradd the following above your existing
RewriteCond
s to prevent it from transforming your admin URLs:And I think that should take care of everything.
Edit: Your
.htaccess
file should look more like the following, though I don't think any of the changes would relate to your 403 error, but maybe we'll get lucky. If not, I'll keep thinking of what might cause that.On admin.mysite.com "/" you can symlink to "/admin"