473,325 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

MOD Rewrite - Cannot work out the correct rule

133 100+
Hi,

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?

Cheers,
Adam
Feb 21 '08 #1
3 1228
Markus
6,050 Expert 4TB
You can use multiple vairables.
An example:
Expand|Select|Wrap|Line Numbers
  1. url: http://website.com/some_cat/some_item/some_other_item.html
  2.  
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
  3.  
hope this helps.
Feb 21 '08 #2
adamjblakey
133 100+
Cheers man works a treat :)
Feb 21 '08 #3
Markus
6,050 Expert 4TB
Cheers man works a treat :)
Glad i could help mate!

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

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

Similar topics

1
by: jbj | last post by:
I am trying to make a javascript function that can rewrite javascript rules dynamically (no, not the style tag of an individual element, but the actual rule in the <head> portion of the document)....
2
by: VM | last post by:
I'm about to work on a 'buggy' WIndows C GUI application that was entirely made in C. All the user controls were all hard-coded and the code is pretty hard to understand. The application was made...
14
by: Stan Canepa | last post by:
This post is mostly for discussion. Why rewrite in .NET? Just a general discussion not related to any specific details. I was just looking to see what reasons developers are looking to, to help...
5
by: Lupus | last post by:
Hello everybody In apache I used a feature called a "Rewrite rule" inside a .htaccess file to process the URL : i.e. http://www/mypage.html =http://www/page.php?page=mypage Now I'd like to do...
2
by: sri_san | last post by:
Hello group, After going through a nice article at MSDN(http://msdn2.microsoft.com/en-us/library/ms972974.aspx), I was able to make the URL rewrite working except for coming up with a generic...
1
by: soniamuk | last post by:
i am facing a typical issue with apache where i have a filter context(written in c++) which pulls information from apache server. in this process when i am trying to fetch an url where rewrite rule...
4
by: adamjblakey | last post by:
What would be the correct MOD Rewrite rule for this: http://www.website.co.uk/building-an...ices/cheshire/ I thought it would be: Code: RewriteRule ^building-and-construction/(+)/(+)/$...
1
by: mazdotnet | last post by:
Hi all, I've installed the new Microsoft URL Rewrite Module for IIS 7.0 http://www.iis.net/downloads/default.aspx?tabid=34&i=1691&g=6 on both my laptop (Vista Home Premium) and my desktop...
0
by: andrewteg | last post by:
I have an application that is installed as http://domain.com/folder/ and serves pages as http://domain.com/folder/index.ext/parent/child/ and I'm trying to remove index.ext from the URL so that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.