How does these two lines conflick ?

Discussion in 'Apache' started by hasbehas, Mar 7, 2008.

  1. #1
    RewriteRule ^my-hotels/(.*).html$ hotel.php?hotelname=$1&menu=guide [L]
    RewriteRule ^my-hotels/(.*)-pictures.html$ hotel-pictures.php?hotelname=$1&menu=guide [L]

    Obviosly what I am trying achive is domain.com/my-hotels/some-hotel-pictures.html

    Each line works on its own.. but not together :( When I add the second line it refers to the first line & hotel.php runs..

    Any ideas for this conflict ?
     
    hasbehas, Mar 7, 2008 IP
  2. nightmare5liter

    nightmare5liter Guest

    Messages:
    79
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    some-hotel-pictures.html matches (.*).html before the other rule is checked.

    Reverse them and be sure to include the [L]
     
    nightmare5liter, Mar 7, 2008 IP
    hasbehas likes this.
  3. hasbehas

    hasbehas Well-Known Member

    Messages:
    726
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    190
    #3
    Damn.. you were right.. Thanks man..
    Thought I have tried everthing.. But.. :(
     
    hasbehas, Mar 8, 2008 IP