Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteRule ^([^/\.]+)/?$ profile.php?id=$1 [L]
What I want to happen so far:
I want example.com to be rewritten to www.example.com, which works fine. Also, I have www.example.com/X to rewrite www.example.com/profile.php?id=X.
My new problem, is that the above rule prevents users from accessing www.example.com/forum. I would actually like www.example.com/forum do a redirect to forum.example.com, but I can't figure out how to do this and make everything else above work.
RewriteCond %{REQUEST_URI} !^/forum
Jim