Virtual Host Template and Redirects

Discussion in 'Install/Configuration' started by innovot, Aug 21, 2014.

  1. innovot

    innovot Member

    Hello,

    am having a problem with redirects when used within a template. I have tried the following but it does not work. What am I doing wrong please ?

    RewriteCond %{HTTP_HOST} !=www.$VH_NAME
    RewriteRule ^ http://www.$VH_NAME%{REQUEST_URI} [R=301,L]
  2. NiteWave

    NiteWave Administrator

  3. innovot

    innovot Member

    Ah, so the LSWS rewrite engine does not support substitution of its own internal variables then ?
  4. mistwang

    mistwang LiteSpeed Staff

  5. innovot

    innovot Member

    The problem though is that if the domain have multiple aliases you cannot redirect to the primary url. Hence trying to use $VH_NAME as I have set that to be the domain name.

Share This Page