Difference in wording between apache1.3 and 2 for .htaccess

Discussion in 'Apache' started by vinnyglennnon, Sep 29, 2006.

  1. #1
    Hi all,
    I have a couple of .htaccess rules which work on Apache2 without any problems. But when I use this on apache 1.3, they break. I have spent 2 days looking for a solution before I posted on the boards. Any help, much appreciated.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^useamap\.com [nc]
    RewriteRule (.*) http://useamap.com/$1 [L]
    # to remap www.useamap.com to useamap.com . useamap works fine,but www.useamap.com breaks

    RewriteRule ^/([^/]*)/$ index.php?page=$1
    #anything going to useamap.com/ will rewrite to useamap.com/index.php?page=
    This works fine on Apache2, have it running on 4 servers!
     
    vinnyglennnon, Sep 29, 2006 IP
  2. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't think the NOT operator works in 1.3 Regex.

    Try:
    RewriteCond %{HTTP_HOST} ^www\.useamap\.com$ [NC]
    RewriteRule ^(.*)$ http://usemap.com/$1 [R=301,L]
    
    Code (markup):
    Regards
    - P
     
    penagate, Sep 30, 2006 IP