Why mod_rewrite doesn't work on Apache 2.2.6?

Discussion in 'Apache' started by rushenas, Nov 6, 2007.

  1. #1
    Hi all
    Can somebody tell me, what is the differences between Apache 1.3 family vs. 2.0 family? I need Apache uses mod_rewrite, basic authentication via browser, also supports PHP 5+. I run the following command for both version 2.2.6 and 1.3.39, but mod_rewrite only actives in 1.3.39. Why I can't enable it for 2.2.6?

    ./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --enable-module=proxy --enable-shared=rewrite

    What must I do for using mod_rewrite in 2.2.6, too?
     
    rushenas, Nov 6, 2007 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    its a question of basic default configuration that differs between apache 1.3 and 2.x
    a year ago i had many days the same problems and it drove me nuts.

    here what i changed to finally solve the problem during upgrade apache 1.3 to 2.2 - may be it helps you.
     
    hans, Nov 7, 2007 IP
  3. kapilcpk1728

    kapilcpk1728 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,

    You can download apache module from apache website . You must download both module version. Then try to write an example module in both version and try to execute it. So, you can understand that apache using diffent structure in different versions. If you would like to work both these version, please add a code in your mod_...... . c file.

    if(version1)
    {
    //here write code for version1
    }
    else
    {
    // here write code for version2
    }


    There is a structure request_rec etc created in some header files like httpd.h in include directory. In both version, the variable names are different. Please study it, so you will understand how to seperate it. Then write a code in this style.

    For each and every problem, there will be a solution. Right?

    Nothing is impossible and Impossible says I M Possible...

    Study again and do yourself. All the Best....

    Best Regards

    KAPIL KRISHNAN CPK
    HP
     
    kapilcpk1728, Nov 8, 2007 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    and if you have done all above
    and still got problems
    then make sure you have done on your remote shell a

    rcapache2 configtest
    rcapache2 extreme-configtest

    if you have a dist that uses OTHER tests - search G for their names
     
    hans, Nov 8, 2007 IP
  5. kapilcpk1728

    kapilcpk1728 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    This is very simple. If you are checking it from a remote computers you should check
    the version, user agents etc. Its very easy to do code in C.

    main()
    {
    ......
    agent=check_useragent();
    ....
    ....
    }

    char *check_useragent(void)
    {
    ....
    return response;
    ...
    }

    Then Mr.Hans, tell me if you have any more problem. I am from development team

    Best Regards
    KAPIL KRISHNAN CPK
     
    kapilcpk1728, Sep 22, 2008 IP