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.
     
  6. GSO

    GSO New Member

    Would be nice, if Member Virtual Hosts could have their own set of Rewrite Rules without having to Instantiate, that way every virtual host can have an additional list of rewrite rules beyond those defined at the Template level, you know for site specific things like 304 redirects of old url's
     

Share This Page