rewrite subdomain to directories...

Discussion in 'Apache' started by benck, Jul 23, 2010.

  1. #1
    I've set wildcard subdomains, and it works (most of the time).

    If the following file is set as...

    httpd.conf:
    <Directory />
        Options FollowSymLinks ExecCGI Indexes
        AllowOverride All
        Order deny,allow
        Deny from all
        Satisfy all
    </Directory>
    
    Code (markup):
    /.htaccess:
    
    RewriteEngine	On
    RewriteCond %{HTTP_HOST} ^blog\.highradio\.tw
    RewriteRule ^(.*)$ wordpress/$1 [L]
    
    ...other rules
    
    Code (markup):
    /exam/.htaccess:
    
    RewriteEngine	on
    
    Code (markup):
    There's a little problem, that is ...
    http://blog.highradio.tw/test/ links to http://www.highradio.tw/wordpress/test/ which is correct.
    http://blog.highradio.tw/exam/ links to http://www.highradio.tw/exam/ which is wrong.

    However, if I remove the "RewriteEngine on" from /exam/.htaccess, it works fine again.
     
    benck, Jul 23, 2010 IP