Desperately Need .htaccess Help

Discussion in 'Apache' started by dalem, Mar 6, 2008.

  1. #1
    Hi

    If I put a .htaccess file in my document root I get 500 server errors.
    If I take it out then the website shows but does not work correctly.
    Can someone tell me if I need to configure something in apache to enable .htaccess files.

    I am really stuck as my script needs .htaccess to run SEO friendly URL's

    Thank you

    dalem
     
    dalem, Mar 6, 2008 IP
  2. Jawn

    Jawn Peon

    Messages:
    200
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    have you tryed a empty htaccess file? cuz seo friendly urls needs to have mod_rewrite enabled in apache.
     
    Jawn, Mar 6, 2008 IP
  3. dalem

    dalem Peon

    Messages:
    494
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3

    Hi jawn
    Thanks for reply

    I tried an empty .htaccess file in my document root as suggested, there are no error 500 messages now but obviously the website doesn't work correctly.

    I looked in httpd.conf and the only reference to mod_rewrite is in the following line:

    #LoadModule rewrite_module modules/mod_rewrite.so

    Do I have to take off the "#" for mod_rewrite to work ?


    Dalem
     
    dalem, Mar 6, 2008 IP
  4. dalem

    dalem Peon

    Messages:
    494
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I replaced the .htaccess with the original configuration.

    I removed the "#" from the following line in http.conf

    #LoadModule rewrite_module modules/mod_rewrite.so

    Now I don't get any server 500 errors but the wesite still doesn't work correctly. It seems the SEF URL's part of it still isn't functioning.

    ( Sorry but apache config is not my strong point )

    dalem
     
    dalem, Mar 6, 2008 IP
  5. hasbehas

    hasbehas Well-Known Member

    Messages:
    726
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    190
    #5
    is this apache on a hosting company or your local machine ??
     
    hasbehas, Mar 8, 2008 IP
  6. dalem

    dalem Peon

    Messages:
    494
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for your help but problem now sorted.
    After hours of apache config.

    Thank you.
     
    dalem, Mar 8, 2008 IP
  7. hasbehas

    hasbehas Well-Known Member

    Messages:
    726
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    190
    #7
    Glad its sorted.. But I am still wondering about my question though..
    Cos I have same problem with my local apache.. I could not get the mod_rewrite to work.. :(

     
    hasbehas, Mar 8, 2008 IP
  8. dalem

    dalem Peon

    Messages:
    494
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Excuse me hasbehas...

    Yes it's on a local machine.

    I have run my own server from home for over a year now.
    It's only lately that I have used SEF URL's.

    There was a commented line in httpd.conf ... all I did was un-comment it, re-started apache and it worked fine afterwards.

    dalem
     
    dalem, Mar 8, 2008 IP
  9. hasbehas

    hasbehas Well-Known Member

    Messages:
    726
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    190
    #9
    I have apache (easyphp actualy) on my home computer, for designing new sites, or altering sites.. I use hosting companies for hosting after completion.

    I have also uncommented #LoadModule rewrite_module modules/mod_rewrite.so resarted apache.. sef urls wouldnt work.. I was wondering if you've done anything else...
     
    hasbehas, Mar 9, 2008 IP
  10. hasbehas

    hasbehas Well-Known Member

    Messages:
    726
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    190
    #10
    I have figured it myself,
    I had to enable htaccess in apache config. Allow override All , That was all..
     
    hasbehas, Mar 10, 2008 IP