Forum Moderators: phranque

Message Too Old, No Replies

folder to subdomain redirection

www.mysite.com/forums to forums.mysite.com?

         

pdesigns

8:35 pm on Aug 15, 2006 (gmt 0)

10+ Year Member



I used the following code but isn't working how i want it:

RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^forums/(.*)$ http://forums.mysite.com/$1%1 [R=301,L]

An example is www.mysite.com/forums/viewforum.php?id=21 and it redirects to forums.mysite.com/viewforum.php21?id=21 instead of forums.mysite.com/viewforum.php?id=21

Is there an easier way to redirect an entire folder regardless of queries/no queries to a sub domain?

Thanks.

pdesigns

8:46 pm on Aug 15, 2006 (gmt 0)

10+ Year Member



never mind found my solution.

redirect 301 /forums/ [forums.mysite.com...]

should have checked better.