Forum Moderators: phranque

Message Too Old, No Replies

Rewrite Rule

         

branmh

6:05 pm on Dec 30, 2004 (gmt 0)

10+ Year Member



I would like to use a rewrite rule to redirect this from /directory/<file>.html?variables to just index.php?section=<file>&variables on the root of the site.

Is there a way to do this?

jdMorgan

6:04 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



branmh,

Yes, this is a simple application of mod_rewrite's capability to test and back-reference query strings using

 RewriteCond %{QUERY_STRING} (variables) 

followed by a rewriterule which back-references the variables.

See our charter [webmasterworld.com] for useful references and information about this forum.

Jim