[SOLVED] YAMRQ (Yet Another mod_rewrite Question)

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

[SOLVED] YAMRQ (Yet Another mod_rewrite Question)

Post by evilmonkey »

Hey everyone,

I am trying to forward xxx.tmeet.com ==> tmeet.com/fwd.php?username=xxx. Behold my might .htaccess file:

Code: Select all

php_flag register_globals off
RewriteEngine on
RewriteRule ^([^/.]+).tmeet.com/?$ fwd.php?username=$1 [L]
But it isn't working =( All the subdomains point to the root, that has been taken care of. But xxx.tmeet.com still goes to index.html instead of to that script. Can someone tell me why and hint at how to correct this issue?

Thanks!
Last edited by evilmonkey on Tue Mar 14, 2006 7:08 pm, edited 1 time in total.
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

You've already asked this question, and I've already given you the answer.
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post by evilmonkey »

I will die of embaressment one of these days. That's what happens when you don't immediately impliment an offered solution. However, the solution you gave me in the orther thread does a 500 error on me (I though that was impossible if I'm with a hosting company). The code is below:

Code: Select all

php_flag register_globals off
RewriteEngine on
RewriteCond   %{HTTP_HOST}        !^www\.
RewriteRule   ^(.+)               %{HTTP_HOST}          [C]
RewriteRule   ([^.]+)\.tmeet\.com  /fwd.php?username=$1
Thanks redmonkey, sorry for being a moron.
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post by evilmonkey »

I fixed the problem. Code below.

Code: Select all

php_flag register_globals off
RewriteEngine on
RewriteCond   %{HTTP_HOST}        !^www\.
RewriteRule   ^(.+)               %{HTTP_HOST}          [C]
RewriteRule   ([^.]+)\.tmeet\.com$ fwd.php?username=$1
($ was missing)

Thanks. :)
Post Reply