Running Zeus on web server - need a little help

Discussion in 'Site & Server Administration' started by Spider-Man, Mar 8, 2008.

  1. #1
    Hey.

    We've just moved from a Plesk-based server to a Linux Namesco server, which runs Zeus.

    I need to redirect non-www to www because cgi-scripts (those that control the shopping cart/order process) only work when www. is in place, otherwise an 'Access Denied' error is given :(

    Any heads up on how to redirect non-www to www as htaccess rules do not work at all.

    I have the rewrite.script file with this:
    RULE_0_START:
    match URL into $ with (.*)
    if not matched then goto RULE_0_END
    # Source line 1
    # RewriteCond %{HTTP_HOST} ^//cupargardencentre.co.uk
    set SCRATCH:COND = %{IN:Host}
    match SCRATCH:COND into % with ^//cupargardencentre.co.uk
    if not matched then goto RULE_0_END
    # Source line 2
    # Second half of: RewriteRule (.*) http://www.cupargardencentre.co.uk/$1 [R=301,L]
    set URL = http://www.cupargardencentre.co.uk/$1
    # This rule has [R]
    set RESPONSE = 301
    set OUT:Location = %{URL}
    set BODY = Please try <a href="%{URL}">here</a> instead\n
    # Implicit [L] when converting
    goto END
    RULE_0_END:
    Code (markup):
    And an .htaccess file with this:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^cupargardencentre.co.uk
    RewriteRule (.*) http://www.cupargardencentre.co.uk/$1 [R=301,L]
    
    order allow,deny
    allow from all
    
    redirect 301 /BrickacedFrontPillars.html http://www.cupargardencentre.co.uk/acatalog/garagebrick.html
    Code (markup):
    With a lot more 301 redirects for specific pages.

    Strange thing is, the file '/BrickacedFrontPillars.html' still redirects, yet non-www doesnt redirect :(

    Can you help? +Rep given to whoever has the working solution!

    Thanks
     
    Spider-Man, Mar 8, 2008 IP
  2. Spider-Man

    Spider-Man Banned

    Messages:
    2,684
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Anyone? :(
     
    Spider-Man, Mar 9, 2008 IP