Page 1 of 1

.htaccess rewrite subdomain

Posted: Sat Oct 21, 2006 3:28 pm
by potato
Hi,

on my site, all the users have a profile page with http://www.mytuningcar.be/profile.php?id=username
what i want to do is, is giving all the users a url like watch.mytuningcar.be/username
i created the subdomain, no problem.

I tried many ways to rewite the url, but none worked.
First i edited the .htaccess code of the rootfolder
Afterwards i tried with the watch-folder.
My problem is that i dont know how to rewrite from the watch-folder to the root folder.

i hope you understand what i'm trying to explain.

many greetings,
tom

Posted: Sat Oct 21, 2006 5:17 pm
by timvw
What have you tried untill now?
RewriteEngine on
RewriteRule ^([A-Za-z0-9-]+)$ /profile.php?id=$1 [L]