simple-php-router icon indicating copy to clipboard operation
simple-php-router copied to clipboard

Suggest using FallbackResource from mod_dir instead of existence checks with mod_rewrite

Open bertvandepoel opened this issue 4 years ago • 5 comments

With the introduction of https://httpd.apache.org/docs/trunk/mod/mod_dir.html#fallbackresource , many have now moved away from the popular mod_rewrite solution to map non-existent files/folders onto something like index.php, towards using FallbackResource. I find it also much more readable and simple. It can also prevent having to enable the rewrite module, which is one of the modules that cause the slowness that some people claim Apache has (its performance is actually similar to nginx if you disable all the modules and settings in apache that nginx doesn't have).

I wouldn't mind sending in a PR to add both options or to replace the existing suggestion for .htaccess, but I thought it would be better for me to first ask :)

bertvandepoel avatar Jul 31 '21 17:07 bertvandepoel

Hi Bert.

Thanks for the great suggestion. Personally I haven't used Apache for a long time, so haven't kept up with all the latest developments on that front however thanks to users like yourself there's instructions for many different web-servers.

If you wouldn't mind, please feel free to share the new behaviors - maybe it can be helpful for those out there that just want to get their project up and running without reading through the Apache manual :)

/ skipperbent

skipperbent avatar Jul 31 '21 19:07 skipperbent

Hi @bertvandepoel,

are you still interested in creating a PR or should I dive into the Apache topic?

~ Marius

DeveloperMarius avatar Feb 02 '22 18:02 DeveloperMarius

It's the same to me. Either of us can do it, it's just editing the README I assume, or were there some other docs that need editing too

bertvandepoel avatar Feb 02 '22 19:02 bertvandepoel

I think you are more into the topic. You can either write me the content here or create the PR yourself. Thank you!

~ Marius

DeveloperMarius avatar Feb 02 '22 19:02 DeveloperMarius

Hey @bertvandepoel,

hope you are doing good? Did you have time to collect the changes that have to be made?

~ Marius

DeveloperMarius avatar Feb 12 '22 22:02 DeveloperMarius