Help !! mode_rewrite on localhost

Discussion in 'Apache' started by nomzz, Apr 28, 2008.

  1. #1
    Hi,

    I am new to this and have tried to search it before posting it, I am installing simple script which redirects and make short urls and it uses .htaccess. Its working fine on server but not my local box, what things should be done to make it working?

    I am getting this error

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.
     
    nomzz, Apr 28, 2008 IP
  2. Trusted Writer

    Trusted Writer Banned

    Messages:
    1,370
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #2
    This is due to mod_rewrite is present but commented out in your httpd.conf file.

    I'm not sure which package are you trying on your localhost. I use XAMPP from www.apachefriends.org and the fix to the problem is this:

    • Go through the following directories: YOUR_SERVER_DIRECTORY >> apache >> conf
    • Inside conf you will find httpd.conf
    • Open this file with your notepad and scroll down to find this line: #LoadModule rewrite_module modules/mod_rewrite.so
    • Uncomment such line and save your httpd.conf
    • If you are running the server while editing, restart it.

    And you will be done :)

    For any other localhost server search for the configuration file inside your installation directory since depending on the distro the location may be slightly different.

    If the above doesn't not work, then you have to double check your .htaccess file since you say it is working properly out of the local machine.
     
    Trusted Writer, May 4, 2008 IP
    chandan123 likes this.
  3. kks_krishna

    kks_krishna Active Member

    Messages:
    1,495
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Even I had the same problem. Thanks for the info.
     
    kks_krishna, May 5, 2008 IP
  4. chandan123

    chandan123 Prominent Member

    Messages:
    11,586
    Likes Received:
    578
    Best Answers:
    0
    Trophy Points:
    360
    #4
    me too having this problem but in windows
    after your post it seems solved thanks :) +rep for you

    also do you know enabling curl in windows ? i am using wamp
     
    chandan123, May 5, 2008 IP
  5. Trusted Writer

    Trusted Writer Banned

    Messages:
    1,370
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #5
    No problem guys :)

    I'm still trying to enable Curl on Windows localhost, not success yet buy I will be updating this thread as soon as I find the workaround ;)
     
    Trusted Writer, May 5, 2008 IP
  6. nomzz

    nomzz Well-Known Member

    Messages:
    475
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    110
    #6
    in my log i am getting this error on my server but it is working on local host

    /home/dhajoint/public_html/.htaccess: Invalid command
    'AcceptPathInfo', perhaps mis-spelled or defined by a module not
    included in the server configuration
     
    nomzz, May 17, 2008 IP