Cant get mod_rewrite to work

Discussion in 'Apache' started by Dejavu, Dec 7, 2005.

  1. #1
    I installed apache on my windows computer, but now I cant get mod_rewrite working..
    I load the module
    and AllowOverride is ALL
    and this my htaccess
    but all I get is 'The requested URL xx was not found on this server.'

    Anybody has an idea how to fix this?
    thanks
     
    Dejavu, Dec 7, 2005 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Try

    RewriteRule ^index.html$ index.php [L]

    and go to domain.com/index.html and see if the php file comes up.
     
    Nintendo, Dec 7, 2005 IP
  3. Dejavu

    Dejavu Peon

    Messages:
    916
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I did that, and the php file came up correctly. Then I changed it back, and voila, it worked!?!

    Thanks anyhow.
     
    Dejavu, Dec 8, 2005 IP
    Colleen likes this.
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    Now post a URL you were trying to get and the original URL, if theres still something you can't get working. That was just to see if you do have mod_rewrite set-up correctly.
     
    Nintendo, Dec 8, 2005 IP
  5. Dejavu

    Dejavu Peon

    Messages:
    916
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Everything seems to be working now, thanks. Actually, I just found my error. My site was in a directory under localhost, and the root didnt have a index.php file! (it was in the dir). Man I feel stupid for missing that, but thats what happens if you get 1h sleep in 2 days, you miss the obvious and start looking for more complicated problems.
     
    Dejavu, Dec 8, 2005 IP