![]() |
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>Code:
[Sun Jul 20 11:55:51 2008] [error] [client 87.67.212.144] File does not exist: /home/annoyed/public_html/tag/redirectEDIT: 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) |
If I understand what you want to do correctly I think you want to replace
Code:
RewriteRule ^([^/]+)$ /index.php?tag=%1 [L]Code:
RewriteRule ^([^/]+)$ http://annoyed.me/?tag=%1 [R=301,L] |
Yes, something similar... This works but the URL in the address bar is changed, something it shouldn't. When I remove the 301 redirect, it throws another 500 error.
I think it's because it conflicts with the way WordPress handles their own mod_rewrite rules... |
Alright. So if someone types in wordpress.annoyed.me the address stays as wordpress.annoyed.me, but internally it is annoyed.me/?tag=wordpress?
What problems were you running into with: Code:
RewriteRule ^([^/]+)$ /index.php?tag=%1 [L] |
It was giving a 500 error... However, when I set it to redirect to a dir different from the WordPress install directory, it works fine.
My guess it has something to do with the WordPress .htaccess mod_rewrite rules? Is there maybe a way to combine the two different RewriteRules into a single one... Or would I have to add a exception to the WordPress .htaccess mod_rewrite rules? Any suggestions are welcome :D |
Sounds like your suspicions are right. I would need to play around with the wordpress .htaccess to get a better idea what exactly is causing the issue.
What error is displaying in the log when you have it as "/index.php?tag=%1"? That may shed some light on the issue. |
http://prologue.annoyed.me/ - This gives you the 500 error;
Prologue annoyed these people - This is the page it should display. It finds the page since it doesn't throw a 404 error. Appearantly, the .htaccess does something with the url which cuases it to give a 500 error. I'm clueless tbqh. I've tried to make them not clash, but no luck from the looks of it... My current .htaccess file: Code:
<IfModule mod_rewrite.c>If anyone could help me out, let me know! I am willing to compensate you! |
The problem I can see with the .htaccess rule below is that the system is trying to accessing "/tag/redirect" instead of passing it through the wordpress system.
Code:
RewriteRule ^([^/]+)$ /tag/%1/index.php?tag=%1 [L]If "/index.php?tag=%1" is causing a 500 error as well I'm curious what error is being recorded in the error log. Besides that I think I'm as stumped as you are. Hopefully someone else has a solution they can post. |
| All times are GMT. The time now is 10:42 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0