Loading ...
Sorry, an error occurred while loading the content.

htaccess rule overflow

Expand Messages
  • Robarto Piaro
    hi i am new in php and at my project i am implementing URL rewrite matters . here first i did rewrite a url on this RULE RewriteRule ^(.+)-(.+).php$
    Message 1 of 4 , Apr 1, 2006
    • 0 Attachment
      hi
      i am new in php and at my project i am implementing URL rewrite matters . here first i did rewrite a url on this RULE
       
      RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2
       
      its ok . works quite fine . problem shows now only i want to show another page when becomes this RULE
       
      RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
       
      for this i write this line top of my .htaccess but it does not works .
      but it works when deleting all others RULE .
       
      lastly i found that its overflowing my rules . now i want a condition . if any one of my rule matches a URL it wont go to match others RULE . Example when it will match with
      RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
       . it do not go match with next rule . is it possible ? did i make u understand ? sorry for my poor english .
       
      thanks


      Abra sua conta no Yahoo! Mail - 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz.
    • Rupom
      Hi, RewriteRule that has greater number of back-references should come first than that with immediate lower numbers. It resolves this kind of problems. So in
      Message 2 of 4 , Apr 1, 2006
      • 0 Attachment
        Hi,
        RewriteRule that has greater number of back-references should come
        first than that with immediate lower numbers. It resolves this kind of
        problems. So in your .htaccess the ordering should be:

        RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2

        RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1

        And to stop processing after getting required one use [L] as the
        RewriteRule's third parameter. With [L], your first Rule becomes:

        RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2 [L]
         
        This flag (L) stops the rewriting process here and don't apply any more rewrite rules.

        Feel free to let us know your progress.

        Regards,
        Rupom

        Robarto Piaro <roberto_200593@...>
        wrote:
        hi
        i am new in php and at my project i am implementing URL rewrite matters . here first i did rewrite a url on this RULE
         
        RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2
         
        its ok . works quite fine . problem shows now only i want to show another page when becomes this RULE
         
        RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
         
        for this i write this line top of my .htaccess but it does not works .
        but it works when deleting all others RULE .
         
        lastly i found that its overflowing my rules . now i want a condition . if any one of my rule matches a URL it wont go to match others RULE . Example when it will match with
        RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
         . it do not go match with next rule . is it possible ? did i make u understand ? sorry for my poor english .
         
        thanks

        Abra sua conta no Yahoo! Mail - 1GB de espa�o, alertas de e-mail no celular e anti-spam realmente eficaz.



         
        Join phpResource Group And Enjoy PHPing...


        New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates.

      • roberto_200593
        thanks for reply . actually i already make it by reordering rule in what way you suggest . but i was confuse about that ! still your [L] doest works here .
        Message 3 of 4 , Apr 1, 2006
        • 0 Attachment
          thanks for reply . actually i already make it by reordering rule in
          what way you suggest . but i was confuse about that ! still your [L]
          doest works here . donno why ?

          can you gave me the link where i can find all matters of rewrite
          constant like [L].

          thanks

          --- In phpresource@yahoogroups.com, Rupom <rupom_315@...> wrote:
          >
          >
          > Hi,
          > RewriteRule that has greater number of back-references should come
          > first than that with immediate lower numbers. It resolves this kind
          of
          > problems. So in your .htaccess the ordering should be:
          >
          > RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2
          >
          > RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
          >
          > And to stop processing after getting required one use [L] as the
          > RewriteRule's third parameter. With [L], your first Rule becomes:
          >
          > RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2 [L]
          >
          >
          > This flag (L) stops the rewriting process here and don't apply any
          more rewrite rules.
          >
          > Feel free to let us know your progress.
          >
          > Regards,
          > Rupom
          >
          > Robarto Piaro <roberto_200593@...> wrote: hi
          > i am new in php and at my project i am implementing URL rewrite
          matters . here first i did rewrite a url on this RULE
          >
          > RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2
          >
          > its ok . works quite fine . problem shows now only i want to show
          another page when becomes this RULE
          >
          > RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
          >
          > for this i write this line top of my .htaccess but it does not
          works .
          > but it works when deleting all others RULE .
          >
          > lastly i found that its overflowing my rules . now i want a
          condition . if any one of my rule matches a URL it wont go to match
          others RULE . Example when it will match with
          > RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
          > . it do not go match with next rule . is it possible ? did i
          make u understand ? sorry for my poor english .
          >
          > thanks
          >
          >
          > ---------------------------------
          > Abra sua conta no Yahoo! Mail - 1GB de espa�o, alertas de e-
          mail no celular e anti-spam realmente eficaz.
          >
          >
          > -------------------------------------------
          > Keep Yourself Here and Enjoy PHPing.
          >
          >
          >
          > ---------------------------------
          > YAHOO! GROUPS LINKS
          >
          >
          > Visit your group "phpresource" on the web.
          >
          > To unsubscribe from this group, send an email to:
          > phpresource-unsubscribe@yahoogroups.com
          >
          > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
          Service.
          >
          >
          > ---------------------------------
          >
          >
          >
          >
          >
          > http://www.rupom.info
          > http://www.rupom.tk
          >
          > Join phpResource Group And Enjoy PHPing...
          >
          >
          > ---------------------------------
          > New Yahoo! Messenger with Voice. Call regular phones from your PC
          for low, low rates.
          >
        • Rupom
          Roberto, It should work. Please check it again. If the problem comes again, please feel free to describe it here. Regards, Rupom roberto_200593
          Message 4 of 4 , Apr 2, 2006
          • 0 Attachment
            Roberto,
            It should work. Please check it again. If the problem comes
            again, please feel free to describe it here.

            Regards,
            Rupom

            roberto_200593 <roberto_200593@...> wrote:
            thanks for reply . actually i already make it by reordering rule in
            what way you suggest . but i was confuse about that ! still your [L]
            doest works here . donno why ?

            can you gave me the link where i can find all matters of rewrite
            constant like [L].

            thanks

            --- In phpresource@yahoogroups.com, Rupom <rupom_315@...> wrote:
            >
            >
            > Hi,
            > RewriteRule that has greater number of back-references should come
            > first than that with immediate lower numbers. It resolves this kind
            of
            > problems. So in your .htaccess the ordering should be:
            >
            > RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2
            >  
            > RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
            >  
            > And to stop processing after getting required one use [L] as the
            > RewriteRule's third parameter. With [L], your first Rule becomes:
            >
            > RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2 [L]
            >
            >    
            > This flag (L) stops the rewriting process here and don't apply any
            more         rewrite rules.
            >
            > Feel free to let us know your progress.
            >
            > Regards,
            > Rupom
            >
            > Robarto Piaro <roberto_200593@...> wrote:    hi
            >   i am new in php and at my project i am implementing URL rewrite
            matters . here first i did rewrite a url on this RULE
            >   
            >   RewriteRule ^(.+)-(.+).php$ product_category.php?id=$1&name=$2
            >   
            >   its ok . works quite fine . problem shows now only i want to show
            another page when becomes this RULE
            >   
            >   RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
            >   
            >   for this i write this line top of my .htaccess but it does not
            works .
            >   but it works when deleting all others RULE .
            >   
            >   lastly i found that its overflowing my rules . now i want a
            condition . if any one of my rule matches a URL it wont go to match
            others RULE . Example when it will match with
            >   RewriteRule ^(.+)-product.php$ product.php?cat_prefix=$1
            >    . it do not go match with next rule . is it possible ? did i
            make  u understand ? sorry for my poor english .
            >   
            >   thanks
            >   
            >
            > ---------------------------------
            >   Abra sua conta no Yahoo! Mail - 1GB de espa�o, alertas de e-
            mail no celular e anti-spam realmente eficaz.    
            >
            >  
            >  -------------------------------------------
            >  Keep Yourself Here and Enjoy PHPing.
            >
            >           
            >      
            > ---------------------------------
            >    YAHOO! GROUPS LINKS

            >    
            >     Visit your group "phpresource" on the web.
            >    
            >     To unsubscribe from this group, send an email to:
            >  phpresource-unsubscribe@yahoogroups.com
            >    
            >     Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            Service.

            >    
            > ---------------------------------


            >     
            >
            >
            > http://www.rupom.info
            http://www.rupom.tk
            >  
            > Join phpResource Group And Enjoy PHPing...
            >
            >            
            > ---------------------------------
            > New Yahoo! Messenger with Voice. Call regular phones from your PC
            for low, low rates.
            >









             
            Join phpResource Group And Enjoy PHPing...


            Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.

          Your message has been successfully submitted and would be delivered to recipients shortly.