A bit more complicated redirect with .htaccess

Discussion in 'Apache' started by robertot5, Mar 28, 2010.

  1. #1
    Hi, I have a website built with wordpress wich is actually an idex for the subsites I have. I have 4 posts on the main page wich I want to send the user to other websites placed on 4 subdomains of the main domain.

    So, I have 4 posts of wich links are like "domain.com/post-one/", "domain.com/post-two/" etc. The .htaccess file contains the below code, wich wordpress creates for its permalinks.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    Code (markup):
    I wold like to redirect each of the "domain/post-xxx/" links to a subdomain, so when the user clicks the "Our forum" wich is actually a wordpress post to be redirected to "forum.domain.com" and so on, but I didn't find put how to do this yet, I know how to make permanents redirects but not separate ones, is this even possible ?
     
    robertot5, Mar 28, 2010 IP