Hi,
Yes, we have many existing rules. Can't it be used in combination
with mod_rewrite? I also tried this rewritematch and it has the
same loop problem.
I thought the problem was that it is a subset of the destination URL? RewriteRule ^/features/linux-malware-the-truth-about-this-growing-threat$ https://linuxsecurity.com/features/linux-malware-the-truth-about-this-growing-threat-updated [L,R=301] This is what the request looks like with the above rewriterule: $ wget -O /dev/null
https://linuxsecurity.com/features/linux-malware-the-truth-about-this-growing-threat
2>&1|grep -E 'Location|HTTP' I don't understand why this didn't match? After this rule, it
went on to check other rules below it. I've spent an exhausting
number of hours stepping through the rewriterules to understand
what's happening. I hope you can follow to help me fix this. applying pattern
'^/features/linux-malware-the-truth-about-this-growing-threat$' to
uri
'/features/linux-malware-the-truth-about-this-growing-threat-updated' After it processed all rules, it passed it to .htaccess: pass through
/features/linux-malware-the-truth-about-this-growing-threat-updated When there was no match until the very end of .htaccess, it
replaced the URI with index.php: rewrite 'features/linux-malware-the-truth-about-this-growing-threat-updated' -> 'index.php' add per-dir prefix: index.php -> /var/www/linuxsec/html/index.php trying to replace prefix /var/www/linuxsec/html/ with / internal redirect with /index.php [INTERNAL REDIRECT] What does [INTERNAL REDIRECT] mean and how is it different from
other redirects? It then loops through the rewrite rules, doesn't match any, then loops through .htaccess again (as you said) until it matches /index.php. RewriteRule ^index.php(/.*){0,1}$ - [L]$ wget -O /dev/null
https://linuxsecurity.com/features/linux-malware-the-truth-about-this-growing-threat
2>&1|grep -E 'Location|HTTP' What am I missing?
As well? I need both? I'm trying to confirm whether the problem is related to the match
being a subset of the final destination? I really don't see any
other matches
Primarily it consists of rules to manage bots, run our image resizer, and an explicit list of files that are accessible - it's a default deny policy, which is why it redirects to the index.php at the end. RewriteCond %{REQUEST_URI} !^/index\.php Thanks,
|