views:

29

answers:

2

I have a system that has both a front end and an administration area.

currently i am giving the admin area a subdomain.

what i'd like to do it have it as a sub directory, e.g http://domain.com/admin

but the admin area is set up to be placed in root.

can i put something in my .htaccess to make the sub directory "/admin" think its the root?

A: 

I don't think so. First, neither 'DocumentRoot' nor 'Alias' can occur in .htaccess. But anyway, if you think about it, by the time it reads your .htaccess it's interpreted the paths, so it's too late to change them.

I'm not sure if you might be able to do what you want with rewriting.

Colin Fine
+1  A: 

If you have access to subdomains, you could place the admin interface under admin.domain.com, and use domain.com/admin as a redirect.

It's horrid, but so the software's requirement on placement.

Alan