httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [users@httpd] users@httpd.apache.org - mod_rewrite question
Date Sat, 18 May 2013 12:20:23 GMT
On Sat, May 18, 2013 at 6:11 AM, Don Edmondson
<don.edmondson@kg-enterprises.com> 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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message