Problem in mod_rewrite

Discussion in 'Apache' started by clickranju, Aug 3, 2008.

  1. #1
    :confused:
    Hi i just bought a new server and configured cpanel on that..
    Now i have serious problem in mod)rewrite..
    with the basic settings mode_rewrite was working fine..
    but i couldnt find GD installed in the basic settings..
    so i updated the apache through WHM for GD..
    but after apache rebuild..mod write is not working correctly..
    when i check the phpinfo()..i could find that mod_rewrite is installed..
    http://89.248.174.30/~clickran/info.php
    Code (markup):
    but when i checked with test rewrite file its not working at all..(the same file was working correctly with my previous/basic settings)
    http://89.248.174.30/~clickran/rewrite/rewrite.php
    Code (markup):


    in many mod_rewrite tutorial i saw that to enable mod_rewrite we have to uncomment "LoadModule rewrite_module modules/mod_rewrite.so" but even i couldnt find these lines in previous httpd.conf and the current httpd.conf..
    Actually i checked the httpd.conf situated in the /usr/local/apache/conf/httpd.conf...is that the correct path for httpd.conf ?????????????

    Can any body please help to solve this issue..:(
     
    clickranju, Aug 3, 2008 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    if you hire me i can solve this issue

    I charge $20 per hour
    you will need to pay me for one hour

    Regards

    Alex
     
    kmap, Aug 3, 2008 IP
  3. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Can you paste the code (rewrite)? Sometimes it acts up when you access it through http://IP/~user/

    Jay
     
    jayshah, Aug 3, 2008 IP
  4. clickranju

    clickranju Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    But Jay.. i could access the page with the same url(http://IP/~user/) in previous setting
    .htaccess file
    RewriteEngine on
    RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]
    Code (markup):
     
    clickranju, Aug 3, 2008 IP
  5. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Try removing the ^ before ^link.

    Jay
     
    jayshah, Aug 3, 2008 IP
  6. clickranju

    clickranju Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    now updated....but not working.....
    this is the updated file
    RewriteEngine on
    RewriteRule link([^/]*).html$ rewrite.php?link=$1 [L]
    Code (markup):
     
    clickranju, Aug 3, 2008 IP
  7. clickranju

    clickranju Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    ok problem solved...after pointing a domain to the server its working correctly..
     
    clickranju, Aug 3, 2008 IP