On Wed, May 3, 2023 at 3:45 PM Frank Gingras <thu...@apache.org> wrote:
> 1) Avoid rewriting from <Directory> or <Location> blocks. > RewriteBase says it cannot be called outside <Directory>, is that not the case...? > 2) Avoid using mod_alias (redirect) from that context as well > I tried putting the redirect outside the <Directory> and it would not redirect at all > 3) Provide more than one rewrite log line, context matters > There are several lines of that nature, but I think I've worked around this by putting a stanza in ssl.conf to handle it > 4) This can be replaced with FallbackResource /index.php: > > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] > > I will look into this > 5) Why are you using mod_rewrite, either way? > I inherited most of this many years ago. These rules were converted from 2.2 to 2.4 a few years back and they kept working until someone decided to move the project to a new webhost outside our domain. We run several webservers and identify the proper URL to serve based on the incoming URL, and mod_rewrite was the easiest method at the time to make sure the correct pages were served.