THANK YOU! Changed the RewriteCond to RewriteCond %{DOCUMENT_ROOT}/$1.shtml -f ...and now it is working (and the logic now makes sense to me :) !!!) Thought (obviously incorrectly) I had read that when using .htaccess you didn't need fully qualified paths. Best Regards Don -----Original Message----- From: Eric Covener [mailto:covener@xxxxxxxxx] Sent: 18 May 2013 13:20 To: users@xxxxxxxxxxxxxxxx; don.edmondson@xxxxxxxxxxxxxxxxxx Subject: Re: users@xxxxxxxxxxxxxxxx - mod_rewrite question On Sat, May 18, 2013 at 6:11 AM, Don Edmondson <don.edmondson@xxxxxxxxxxxxxxxxxx> wrote: > Don't know if I reply to the group or just to you? > >> > RewriteCond $1.shtml -f >> This line doesnt make sense. What is $1 doing there what is it > referencing? >> >RewriteRule ^(kgp[a-z0-9]*)\.html$ $1.shtml [PT] > > Sorry - not sure which line you are referring to - but, either way, it > makes perfect sense! It is a back-reference to the parenthesised > expression 'kgp[a-z0-9]*'. As an example - if the requested URI is > kgpwed.html then the RewriteCond is checking if kgpwed.shtml exists > and if it exists the RewriteRule causes it to be passed to the client instead of kgpwed.html. > This can be seen in the trace... > With !-f > [perdir D:/xampp/htdocs/] RewriteCond: input='kgpwed.shtml' pattern='!-f' > => matched You should pass an absolute filesystem path to -f and -d. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx