Results 1 to 3 of 3

lighttpd rewrite www.domain to domain without www

This is a discussion on lighttpd rewrite www.domain to domain without www within the General Discussion forums, part of the vBulletin SEO Discussion category; I am using lighttpd instead of apache because it is much faster on my server. Now I would like to ...

  1. #1
    Junior Member
    Real Name
    Paul Janowitz
    Join Date
    Dec 2005
    Location
    Berlin
    Posts
    22
    Liked
    0 times

    lighttpd rewrite www.domain to domain without www

    I am using lighttpd instead of apache because it is much faster on my server. Now I would like to redirect www.domain to domain without www, because google has spidered both of them.

    On mod_rewrite I know how to solve it, but how can I rewrite in in lighttpd?

  2. #2
    vBSEO Staff Juan Muriente's Avatar
    Real Name
    Juan Carlos Muriente
    Join Date
    Jun 2005
    Location
    Puerto Rico
    Posts
    14,266
    Liked
    586 times
    Not tested, but this code may work:
    Code:
    $HTTP["host"] == "^yourdomain.com" {
    server.document-root = "/path/to/your/public_html/"
    url.rewrite-once = (
    "^/(.*)$" => "http://www.yourdomain.com/$1"
    )
    }
    Also, vBSEO has the following beta option in config for this:
    Code:
        define('VBSEO_CHECK_WWWDOMAIN',     0);
    Set it to 1 and you shouldn't require any rewrite rules

  3. #3
    Junior Member
    Real Name
    Paul Janowitz
    Join Date
    Dec 2005
    Location
    Berlin
    Posts
    22
    Liked
    0 times
    Thank you very much for your help. I didn't test the lighttpd rewrite yet, but the vBSEO option unfortunately doesn't work for me... I will give you feedback after testing the lighttpd

Similar Threads

  1. Syntax for Custom Rewrite Rules
    By Joe Ward in forum Custom Rewrite Rules
    Replies: 33
    Last Post: 02-10-2011, 08:49 PM
  2. Redirecting non-www to www version
    By DN lodge in forum General Discussion
    Replies: 2
    Last Post: 03-16-2008, 11:47 AM
  3. sub domain change rewrite question
    By leeds1 in forum Custom Rewrite Rules
    Replies: 6
    Last Post: 11-08-2006, 12:05 PM
  4. vBSEO 2.0 RC7 Released
    By Juan Muriente in forum vBSEO Announcements
    Replies: 17
    Last Post: 09-08-2005, 11:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •