views:

220

answers:

1

I have a photo gallery at mydomain.com/photos. I'd like to use RewriteRule to enforce photos.mydomain.com as the URL, but the photo gallery comes with its own .htaccess that declares a RewriteBase of /. I think that this is preventing me from doing the otherwise simple redirect I'm aiming for. How do I do this?

A: 

I'm not sure how to do that with htaccess, but you could set a subdomain in your hosting's panel.

And, I think you can add subdomains yourself with Apache's Virtual Hosts.

Daniel S
the subdomain itself works fine -- right now you can access the gallery by both domain.com/photos and photos.domain.com. I want to rewrite the URLs that come in to domain.com/photos.
amo
Yet "http://domain.com/photos/10248" doesn't work just as "http://photos.domain.com/10248"? This might be a server issue, try posting it on Serverfault (Stack Overflow's sister website).
Daniel S