Page 1 of 1

mod rewrites for subdomains?

Posted: Sat Nov 12, 2005 1:20 pm
by imapumpkin
Hi all, I would like to map my subdomains to my categories.

I have set up three subdomains as follows:
audio.mydomain.com
video.mydomain.com
photos.mydomain.com

The actual path in my web directory is:
public_html/audio
public_html/video
public_html/photos

And have set up three categories in serendipity:
audio
video
photos

What I want to happen is when someone clicks on for example audio.mydomain.com it displays all my audio entries. I want the url to display audio.mydomain.com rather than www.mydomain.com/categories/1-audio

Would this be a mod rewrite thing? I have the pretty URL option turned on in serendipity and have looked at the .htaccess file but I dont really understand it. If anyone could pass on any pointers that would help me achieve this I would be most grateful.

Thanks

best wishes
imapumpkin :)

Re: mod rewrites for subdomains?

Posted: Sat Nov 12, 2005 1:30 pm
by garvinhicking
I think you need to let all three domains point to your public_html/serendipity directory, not to their own directories. Only then you can use the mod_rewrite stuff as intended.

If you don't get that to work, you would need to create your own serendipity plugin, or use HTTP redirection but then loose the URL name "audio.mydomain.com".

Best regards,
Garvin

Posted: Sat Nov 12, 2005 5:02 pm
by imapumpkin
Thanks for your speedy reply Garvin. Sometimes I make things more difficult than they actually are and miss the blindingly obvious!!

Got it working now.

Thanks for your help :D

Posted: Sat Nov 12, 2005 5:42 pm
by garvinhicking
Great to hear! Hope you'll have fun! :-))

Best regards,
Garvin