.htaccess RewriteRule - problem with paths with the same name as image files

Discussion in 'Apache' started by apcha, Aug 1, 2010.

  1. #1
    Hi,

    I have got a quite strange problem which appears on my new hosting (trusted company). I have never had problems with the rule below on my previous hostings and I didn't change anything.

    I am using for example:

    RewriteRule ^example$ example.php [L]
    Code (markup):
    and I have files example.php and example.jpg in the same directory root. When I open the page www.example.com/example then example.jpg is loading instead of example.php (the real content php page with image)

    Do you know how to correct it without changing image file place to other folder (images are already indexed in Google with old path)?


    Greetings
     
    apcha, Aug 1, 2010 IP
  2. apcha

    apcha Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Problem solved: I disabled MultiViews at the beginning of .htaccess file:

    Options -MultiViews
     
    apcha, Aug 1, 2010 IP