wp-now: Support pretty permalinks without index.php#164
wp-now: Support pretty permalinks without index.php#164adamziel merged 1 commit intoWordPress:trunkfrom
index.php#164Conversation
index.phpindex.php
|
I noticed the package /**
* Supports URL rewriting to remove `index.php` from permalinks.
*/
add_filter('got_url_rewrite', '__return_true');From: Some (but not all?) of the other customizations in that mu-plugin seem possibly useful for |
|
cc @bgrgicak, this is relevant to the discussion in WordPress/wordpress-playground#1054
The following ones should be also useful in every Playground-based app:
Making that mu-plugin modular and exporting it from the Playground repo in some form would be really useful. |
|
In the meantime, let me merge this PR. Good work @eliot-akira! 🎉 |
|
@sejas would you be up for releasing a new version? |
What?
Before
After
Why?
The admin screen at Settings -> Permalinks prepends
index.phpto all pretty permalinks if the functiongot_url_rewrite()returns false. (wp-admin/options-permalink.php)There's a filter
got_url_rewriteto override this behavior. (wp-admin/misc.php)How?
Adds a one-line mu-plugin to set the filter to return true. This is done in
downloadMuPlugins(), which is called duringstartWPNow().Testing Instructions
npx nx preview wp-now starthttp://localhost:8881/wp-admin/options-permalink.phpindex.php