tags:

views:

21

answers:

1

I want to send

www.mydomain.com/approve/SomeFunkyVariable to

www.mydomain.com/home/index.php?option=com_content&task=view&id=574&Itemid=85&approve=someFunkyVariable

What is the rule for this?

A: 

Completely ignoring the params (considering you haven't mentioned them)

RewriteEngine on
RewriteRule ^approve/([^/\.]+)/?$ index.php?option=com_content&task=view&id=574&Itemid=85&approve=$1 [L]

To include the params you'll need a url like

www.mydomain.com/com_content/view/547/85/approve/SomeFunkyVariable

RewriteEngine on
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)?$ index.php?option=$1&task=$2&id=$3&Itemid=$4&$5=$6 [L]
Pez Cuckow
Mark Flint
Err, thats exactly what the first half of my answer does?
Pez Cuckow
Ah, don't know how I missed that! Thank you.
Mark Flint
To summarize ([^/\.]+) just means all accepted chars, and then you refer to it with $0 (where 0 is the number of the regex above)
Pez Cuckow
Thanks - that's working just how I want it now :-)
Mark Flint