I\'d like to use mod rewrite in to convert web page addresses like /directory to /directory/index.html, in a standard LAMP hosting situatio
For why adding the x
makes it work:
If the replacement will match the regex, the RewriteRule will be applied again. As an example, this causes an error:
RewriteRule ^(.*)$ $1.rb
because it would replace script
with script.rb
. That matches the regex, so it replaces script.rb
with script.rb.rb
, again and again...
This is hinted at in the error log:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary.
In your example, you add index.html to the end. When there is an x
at the end of the regex, then it won't match your replacement, which ends in an l
.