View Single Post
Old 07-20-2008, 11:03 AM   #1 (permalink)
Gilles
The Visitor
 
Join Date: Jul 2008
Posts: 4
Thanks: 4
Gilles is on a distinguished road
Default mod_rewrite subdomain & WordPress problem

Hey everyone,

sorry for my first post being a question, but I've been trying everything and googled everything all night.

For one of my sites, annoyed.me, I want a subdomain to redirect to a folder on the main site; for example:

wordpress.annoyed.me -> annoyed.me/?tag=wordpress

I think I've done all the required work: the wildcard dns is setup and the .htaccess is pretty much complete (I think) but it's throwing me a 500 error. Would this have something to do with WordPress?

This is my .htaccess code:
Code:
<IfModule mod_rewrite.c>

	Options +FollowSymLinks 
	RewriteEngine on

	# BEGIN Subdomain
	RewriteCond %{HTTP_HOST} !^www\.annoyed\.me$ [NC] 
	RewriteCond %{HTTP_HOST} ^([^\.]+)\.annoyed\.me$ [NC] 
	RewriteRule ^([^/]+)$ /index.php?tag=%1 [L]
	# END Subdomain

	# BEGIN WordPress
	RewriteBase /
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule . /index.php [L]
	# END WordPress

</IfModule>
If anyone could help me out? As far as I know, the mod_rewrite is working fine. I changed index.php?tag=%1 to tag/%1/ which then gave me a 404 error that it couldn't find the folder (with the correct naming etc ...)
Code:
[Sun Jul 20 11:55:51 2008] [error] [client 87.67.212.144] File does not exist: /home/annoyed/public_html/tag/redirect
Anyone have any clues on what could be giving me this 500 error? If you need any more information, just let me know.

EDIT: obviously, you can see the error here: http://prologue.annoyed.me (this is an actual tag, so if I would be able to fix this, it should show Prologue annoyed these people but, obviously, with http://prologue.annoyed.me)
Gilles is offline  
Reply With Quote