Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine onRewriteRule ^variable/value/$ /index.php/variable/value/ [L]
ie. the page you are looking for goes between the ^ and the $
and the page you wish to go to appears from the web root
I assumed you dont want the url displayed to change - if you do, then change [L] to [R=301,L]
You can learn more at
[webmasterworld.com ]
and more advanced stuff at:
[httpd.apache.org ]
and
[engelschall.com ]
HIH
Please see our charter [webmasterworld.com]. We will be happy to answer specific questions about your code, and to help you learn to write good code, but we are not a free code-writing service. There are hundreds of threads [google.com] here dealing with rewrites, and the documentation from Apache is worth a read. With respect, bad mod_rewrite code can seriously mess up your site, so you must be an informed user to avoid disaster.
The technique you are looking for is called a "back-reference" and is discussed in the mod_rewrite documentation of the RewriteRule and RewriteCond directives.
Refs:
Apache mod_rewrite documentation [httpd.apache.org]
Apache URL Rewriting Guide [httpd.apache.org]
Regular Expressions Tutorial [etext.lib.virginia.edu]
Jim