Importing an Apache Vhost to Existing Litespeed Installation

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

  1. docarzt

    docarzt Member


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

    I partner with another company and they had a vhost setup ( 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>
    RewriteEngine On
    RewriteRule ^(.*)$$1 [R=301,L]

    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 Well-Known 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 Member

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

    webizen Well-Known Member

    make sure DNS of 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 Member

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

    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]

    # END WordPress

    Options -Indexes

    RewriteEngine On
    RewriteRule (.*)$1 [R=301,L]

    that is what we have in there.
  6. webizen

    webizen Well-Known Member

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

Share This Page