Skip to content

Commit c280b8f

Browse files
committed
Prefer FallbackResource directive over Rewrite for CMS
1 parent fae84ed commit c280b8f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,11 @@ enable "src/rewrites/rewrite_http_to_https.conf"
142142

143143
#### Adding custom modules
144144

145-
Imagine you're passing all requests to non-existing files to your favourite web framework. The according *mod_rewrite* snippet would go like this:
145+
Imagine you're passing all requests to non-existing files to your favourite web framework. The according
146+
[_mod_dir_](https://httpd.apache.org/docs/trunk/mod/mod_dir.html#fallbackresource) snippet would go like this:
146147

147148
```
148-
RewriteEngine On
149-
RewriteCond %{REQUEST_FILENAME} !-f
150-
RewriteCond %{REQUEST_FILENAME} !-d
151-
RewriteRule ^ index.php [QSA,L]
149+
FallbackResource index.php
152150
```
153151

154152
Store this snippet in a file, e.g. **config/framework_rewrites.conf,** and add a reference in your **htaccess.conf:**

0 commit comments

Comments
 (0)