good day dear Linux-experts and friends,
first of all - this is one of my first postings in the new year. I am wishing you all a bright and good (and prosperous) new Year 2026
I’m currently debugging a WordPress installation where I’ve hit an interesting (and educational) edge case between Apache, mod_rewrite and WordPress’ internal routing, and I’d love to hear how others reason about this boundary.
Setup ( roughly simplified):
the findings and hmm - the symptoms - i currently encounter:
But wait - there is more - i have got trouble with the following
Which strongly suggests Apache blocks path-based requests before WordPress ever sees them.
What makes this interesting to me:
So the real question seems to be to me::
I’m especially interested in:
Did any body of you encounter similar things. Currently i am a bit clueless.
I feel this is one of those “you only learn it when it breaks” situations – and I’d love to collect experiences, mental models, and debugging strategies from others.
Thanks in advance – and happy to report back with the final root cause once found.
greetings
first of all - this is one of my first postings in the new year. I am wishing you all a bright and good (and prosperous) new Year 2026
I’m currently debugging a WordPress installation where I’ve hit an interesting (and educational) edge case between Apache, mod_rewrite and WordPress’ internal routing, and I’d love to hear how others reason about this boundary.
Setup ( roughly simplified):
- Apache 2.4 (mod_rewrite enabled)
- PHP 8.x
- WordPress (classic, not Bedrock)
- Custom Post Type edih (registered via CPT UI, standard settings)
- Default WordPress .htaccess rewrite rules
the findings and hmm - the symptoms - i currently encounter:
- /?p=123 works
- WP Admin works
- Database + PHP clearly fine
- .htaccess contains the standard WP catch-all rewrite
- mod_rewrite is loaded
But wait - there is more - i have got trouble with the following
- /foo/ → 403 Access denied
- /foo/addsmart/ → 403
- at some point even /test.php returned 403
Which strongly suggests Apache blocks path-based requests before WordPress ever sees them.
What makes this interesting to me:
- Some server-side reasoning expects an explicit rewrite rule for /edih/
- But in WordPress, CPTs are never mapped via Apache rules – only via the catch-all → index.php
So the real question seems to be to me::
Where exactly does WordPress routing begin, and under which Apache configurations can it be completely bypassed or blocked?
I’m especially interested in:
- Apache <Directory> / Require / Options pitfalls
- mod_security / WAF behaviour with extensionless URLs
- cases where .htaccess exists but is not evaluated as expected
Did any body of you encounter similar things. Currently i am a bit clueless.
I feel this is one of those “you only learn it when it breaks” situations – and I’d love to collect experiences, mental models, and debugging strategies from others.
Thanks in advance – and happy to report back with the final root cause once found.
greetings

