what's wrong with this redirect?

Discussion in 'Apache' started by tsabar, Nov 11, 2005.

  1. #1
    trying to get subdir.example.com to redirect to:
    www.example.com/dir1/index.php?c=subdir

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(subdir\.)?example\.com [NC]
    RewriteRule .* http://www.example.com/dir1/index.php?c=%1 [R=301,L]

    (yes, i obviously don't know what i'm doing!)

    thanx in advance!
     
    tsabar, Nov 11, 2005 IP