httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin French <>
Subject [users@httpd] help with rewrite please
Date Wed, 27 Aug 2003 02:26:09 GMT
Hi all,

I'm attempting (badly) to create a generic rewrite rule that I can use 
site-wide, rather than specific rules for each section, and on two 
different servers.

For starters, on my LAN test server, the 'site' lives within a 
directory eg:


The next 'block/' will always be the script name, eg products 
(products.html), so that needs to be captured for the rewrite as $1.

 From there, I will have anywhere from zero to 2 more 'blocks/'

I'd also hope that the rewrite rules match regardless of a trailing /

Some examples:  (doesn't need a rewrite) 					> products.php?1=cd 		> products.php?1=cd&2=45 					> about.php?1=staff 	> faq.php?1=something&2=foo

Here's what I have in my .htaccess file so far, which is NOT working.

Options +MultiViews
RewriteEngine on

# for LAN
RewriteRule ^/clientname/(.*)/(.*) $1.html?1=$2
RewriteRule ^/clientname/(.*)/(.*)/(.*) $1.html?1=$2&2=$3

# for LIVE
RewriteRule ^/(.*)/(.*) $1.html?1=$2
RewriteRule ^/(.*)/(.*)/(.*) $1.html?1=$2&2=$3

Any help or linkage would be great!


Justin French

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message