On Wed, Nov 4, 2009 at 1:19 PM, Rich Bowen <[email protected]> wrote:
> Will this fix it? :
>
>
> @@ -177,11 +177,14 @@
> # backward compatibility ruleset for
> # rewriting document.html to document.php
> # when and only when document.php exists
> +<Directory /var/www/htdocs>
> RewriteEngine on
> +RewriteBase /var/www/htdocs
>
> RewriteCond $1.php -f
> RewriteCond $1.html !-f
> -RewriteRule ^(.*).html$ $1.php
> +RewriteRule ^(.*).html$ $1.php
> +</Directory>
> </pre></example>
> </dd>
RewriteBase is the URL-path, not the filesystem path. And I don't
think test strings in a condition are expanded with respect to the
base.
You can figure out where the first pass landed by using
%{REQUEST_FILENAME} in per-dir context:
Alias /a /tmp/a
<directory /tmp/a>
RewriteBase /a
RewriteEngine on
# full path in per-directory contet
RewriteCond %{REQUEST_FILENAME} (.*)\.html$
RewriteCond %1.php -f
RewriteRule (.*)\.html$ $1.php
</directory>
--
Eric Covener
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]