TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 07-20-2008, 11:03 AM   #1 (permalink)
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
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 02:44 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design