Importing an Apache Vhost to Existing Litespeed Installation

Discussion in 'Apache Migration/Compatibility' started by docarzt, Nov 10, 2011.

  1. docarzt

    docarzt New Member

    Hello,

    I have Litespeed for cPanel and my situation is as follows:

    I partner with another company and they had a vhost setup (tvovermind.zap2it.com) that simply sent all traffic to my ip/dns. Now we've moved to our own domain and the engineer at the company sent me the following vhost info to add to my "apache config" so that my server would redirect requests coming through the vhost to the new root domain:

    <VirtualHost *:80>
    ServerName tvovermind.zap2it.com
    RewriteEngine On
    RewriteRule ^(.*)$ http://www.tvovermind.com$1 [R=301,L]
    </VirtualHost>

    Obviously since I'm not running Apache, this does me no good and my server tech is MIA. How do I port this directive to the existing litespeed install?

    Thanks in advance.
  2. webizen

    webizen New Member

    you can put the rewrite rules in .htaccess under vhost docroot. make sure vhost AllowOverride is set to FileInfo at least to make .htaccess effective.
  3. docarzt

    docarzt New Member


    I tried and it won't work because I need to trick litespeed into believing tvovermind.zap2it.com is on my server and redirect those requests to tvovermind.com. Hence the reason to add the vhost to apache, or in this case litespeed, config....
  4. webizen

    webizen New Member

    make sure DNS of tvovermind.zap2it.com point to the server served by litespeed. you can test with below if DNS is not ready.
    should see a 301 redirect.
  5. docarzt

    docarzt New Member

    Yes this is working for root domain only. for some reason links like:

    tvovermind.zap2it.com/greys-anatomy/greys-anatomy-sneak-peeks-season-8-episode-9-dark-was-the-night/103776

    are not redirecting. the server guy at tribune sent the vhost entry as the fix. Maybe there is an issue with the htaccess...

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Options -Indexes

    RewriteEngine On
    RewriteRule (.*) http://www.tvovermind.com/$1 [R=301,L]

    that is what we have in there.
  6. webizen

    webizen New Member

    you should remove the rules for WP. you are doing redirect for everything. no need to keep them.

Share This Page