MOD Rewrite - Cannot work out the correct rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adamjblakey
    New Member
    • Jan 2008
    • 133

    MOD Rewrite - Cannot work out the correct rule

    Hi,

    What i have done is set-up links like this:
    <a href="{$domain}/corporate-events/{$result.subcat egory|stripres} .html" title="Corporat e Events - {$result.subcat egory}" class="submenu" >{$result.subca tegory}</a>

    With the re-write rule:
    RewriteRule ^corporate-events/(.*)\.html$ entertainment-listings.php?ti tle=$1

    This is working fine but what i want to do now is have the link like this:
    <a href="{$domain}/{$resultb.regio n|stripres}/{$cat}/{$pagename|stri pres}.html" title="{$result b.area} - {$resultb.regio n}" class="submenu" >{$resultb.regi on}</a>

    What would the re-write be on this?

    Cheers,
    Adam
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    You can use multiple vairables.
    An example:
    Code:
    url: http://website.com/some_cat/some_item/some_other_item.html
    [code=apache]
    # rewriterule:
    RewriteRule ^([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)\.html$ index.php?cat=$ 1&item=$2&other _item=$3
    [/code]

    hope this helps.

    Comment

    • adamjblakey
      New Member
      • Jan 2008
      • 133

      #3
      Cheers man works a treat :)

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Originally posted by adamjblakey
        Cheers man works a treat :)
        Glad i could help mate!

        Post back when you need some help

        Comment

        Working...