By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,830 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,830 IT Pros & Developers. It's quick & easy.

MOD Rewrite - Cannot work out the correct rule

P: 133

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

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

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

What would the re-write be on this?

Feb 21 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 5K+
P: 6,050
You can use multiple vairables.
An example:
Expand|Select|Wrap|Line Numbers
  1. url:
Expand|Select|Wrap|Line Numbers
  1. # rewriterule:
  2. RewriteRule ^([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)\.html$ index.php?cat=$1&item=$2&other_item=$3
hope this helps.
Feb 21 '08 #2

P: 133
Cheers man works a treat :)
Feb 21 '08 #3

Expert 5K+
P: 6,050
Cheers man works a treat :)
Glad i could help mate!

Post back when you need some help
Feb 21 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.