htaccess not working on server

Discussion in 'PHP' started by balajikomathi, Jan 7, 2014.

  1. #1
    Dear all,
    I have created a htaccess file in my local system..its work fine.
    I upload my all files into 1and1 hosting but htaccess file not working....

    Thanks
     
    balajikomathi, Jan 7, 2014 IP
  2. dayvo

    dayvo Active Member

    Messages:
    585
    Likes Received:
    52
    Best Answers:
    1
    Trophy Points:
    55
    #2
    Did you upload it as .htaccess?

    Can you provide the contents of the .htaccess file please
     
    dayvo, Jan 7, 2014 IP
  3. balajikomathi

    balajikomathi Member

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    this my htaccess file . working on local ony
     

    Attached Files:

    balajikomathi, Jan 7, 2014 IP
  4. dayvo

    dayvo Active Member

    Messages:
    585
    Likes Received:
    52
    Best Answers:
    1
    Trophy Points:
    55
    #4
    And when you say not working - do you get a 500 error on the server, or do the rewrites just not happen?
     
    dayvo, Jan 7, 2014 IP
  5. dayvo

    dayvo Active Member

    Messages:
    585
    Likes Received:
    52
    Best Answers:
    1
    Trophy Points:
    55
    #5
    Just something I found doing a quick search on 1&1 htaccess issues which might be of some help:

    Or try changing the following line:

    RewriteRule ([^/\.]+)/([^/\.]+)/([^/\.]+)$ property-details.php?id=$2 [L,NC]

    To

    RewriteRule ([^/\.]+)/([^/\.]+)/([^/\.]+)$ /property-details.php?id=$2 [L,NC]
     
    dayvo, Jan 7, 2014 IP
  6. balajikomathi

    balajikomathi Member

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #6
    thanks, its working fine. wat the reason add / ....
     
    balajikomathi, Jan 7, 2014 IP
  7. dayvo

    dayvo Active Member

    Messages:
    585
    Likes Received:
    52
    Best Answers:
    1
    Trophy Points:
    55
    #7
    I think it was catching the url and changing it to domain.comproperty-details.php?id=$2 - the slash just formats the url properly.

    Im not on 1&1 but ive seen a few people have issues with htaccess on their hosting.

    Glad its working now
     
    dayvo, Jan 7, 2014 IP
  8. balajikomathi

    balajikomathi Member

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #8
    Thanks for the reply friend...
     
    balajikomathi, Jan 7, 2014 IP