mod rewrites --> not working

Discussion in 'Apache' started by iperez_genius, Sep 6, 2010.

  1. #1
    Before i post on a forum i always do extensive research intomy question. Well i can't solve my problem so i am here..

    Simply i have a local server setup for building php sites.

    The server is apache 2.2 with php 5.2 and mysql

    I know it all works fine as i have a site built. I now want to implement mod-rewrites.

    I have a php script that is supposed to test if mod rewrites are setup correctly and of course they are not right otherwise i wouldn't be here.

    What i have done is un-commented
    LoadModule rewrite_module modules/mod_rewrite.so
    in the httpd.conf
    restarted the server...
    in the htaccess file that is in the root directory

    RewriteEngine On
    RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]


    In the rewrite.php file i have two links
    link2.html
    rewrite.php?link=1

    the rule above should redirect each link to the same page ie
    link2.html >> rewrite.php?link=2
    rewrite.php?link=1 >> rewrite.php?link=1

    Well it doens't work

    Have i missed a step in the apache setup? Is there any way to test that the module is working? at the apache level?

    Thanks in advance

    Ilan
     
    iperez_genius, Sep 6, 2010 IP