3

I'm just using the following .htaccess config. But when I try to access a non-existent .php file, eg. xyz.php, the server returns a 404 instead of rewriting to index.php. What am I missing?

RewriteEngine on
FallbackResource /index.php
MrWhite
  • 43,179
  • 8
  • 60
  • 84
Arya Same
  • 397
  • 1
  • 3
  • 12
  • Are there any other directives in your htaccess? – Amit Verma Jul 08 '18 at 07:38
  • nope,i think its a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=52403 – Arya Same Jul 08 '18 at 15:07
  • This isn't necessarily a bug (although it certainly feels like it is), it would seem to depend on how PHP is configured - as an Apache handler (`SetHandler` / `AddHandler`) or as FastCGI? In this case, the PHP handler would seem to take priority as `FallbackResource` only applies to the _default_ handler. (?) – MrWhite Jun 04 '19 at 18:15
  • Btw, `RewriteEngine` has nothing to do with `FallbackResource`, which is part of mod_dir. – MrWhite Jun 04 '19 at 18:15

0 Answers0